Skip to content

Instantly share code, notes, and snippets.

View sdkcodes's full-sized avatar

Elusoji sodeeq sdkcodes

View GitHub Profile
@sdkcodes
sdkcodes / compress_video
Created August 22, 2024 10:03 — forked from trvswgnr/compress_video
portable shell script to compress videos with ffmpeg
#!/bin/sh
print_usage() {
echo "usage: compress_video <input_file>"
echo "supported formats: mp4, webm, mkv, mov, avi, flv"
}
get_extension() {
f="${1##*/}"
case "$f" in
{"window":{"width":750,"height":649},"event_log":[{"selector":"#topics > div:nth-child(1) > div.col-sm-8 > div:nth-child(4) > div:nth-child(1) > div.subjects > div.eachSubj > div.topic > a:nth-child(1)","isTrusted":true,"detail":0,"which":0,"type":"focus","eventPhase":1,"bubbles":false,"cancelable":false,"defaultPrevented":false,"composed":true,"timeStamp":33710.199999809265,"returnValue":true,"cancelBubble":false},{"selector":"#topics > div:nth-child(1) > div.col-sm-8 > div:nth-child(4) > div:nth-child(1) > div.subjects > div.eachSubj > div.topic > a:nth-child(1)","isTrusted":true,"detail":0,"which":0,"type":"focusin","eventPhase":1,"bubbles":true,"cancelable":false,"defaultPrevented":false,"composed":true,"timeStamp":33720.699999809265,"returnValue":true,"cancelBubble":false},{"selector":"#topics > div:nth-child(1) > div.col-sm-8 > div:nth-child(4) > div:nth-child(1) > div.subjects > div.eachSubj > div.topic > a:nth-child(1)","isTrusted":true,"screenX":235,"screenY":353,"clientX":235,"clientY":282,"ctrlKey"
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]
@sdkcodes
sdkcodes / Login.js
Last active August 26, 2018 12:06
A vuejs component
<template>
<div class="text-center">
<form class="form-signin" @submit.prevent="doLogin">
<h1 class="h3">Please sign in</h1>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" v-model="email" autofocus required>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" class="form-control" v-model="password" placeholder="Password" required>
<button class="btn btn-lg btn-primary btn-block" type="submit" id="signin-button">Sign in</button>
class Auth{
static isLoggedIn(){
return Auth.tokenPresent();
}
static tokenPresent(){
return Auth.getAuthToken() != null;
}
static getAuthToken(){