Skip to content

Instantly share code, notes, and snippets.

View Fardinak's full-sized avatar
🧠
AI-ing

Fardin Koochaki Fardinak

🧠
AI-ing
View GitHub Profile
@Fardinak
Fardinak / copyvid.sh
Last active December 31, 2015 07:49
Copy fully played online videos from services that use flash players.Run commands as root.
#!/bin/bash
STORAGE=/home/$USER/Downloads;
# Get Process ID
PROCID=$(pgrep -f flash);
# Change current directory to
cd /proc/$PROCID/fd;
# Get file names
@Fardinak
Fardinak / alertbox.jquery.js
Last active December 23, 2015 02:49
A multi-alert handler, with show/hide/timeout/dismiss functionality; developed based on Twitter Bootstrap's alert styling, but easy to modify. It's using jQuery, but a vanilla implementation is easy to achieve.
/** @constructor */
window.alertbox = new (function($, window, undefined) {
var $alb = $('<div id="alertbox" class="alert">').hide().appendTo('body')
, timer = null
, next = [];
/**
* Enum for alert types and their respective class names
*
* @public