This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function makelongshadow($color) { | |
$val: (); | |
@for $i from 1 through 100 { | |
$val: append($val, append(#{$i}px #{($i)}px 0, darken($color, 15%)), comma); | |
/* Uncomment the following two lines for expanded shadow */ | |
/* $val: append($val, append(#{$i}px #{($i * 2)}px 0, darken($color, 15%)), comma); | |
$val: append($val, append(#{$i * 2}px #{$i}px 0, darken($color, 15%)), comma); */ | |
} | |
@return $val; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// include jquery, momentjs | |
$(function () { | |
var m = moment(); | |
m.lang('es'); // week start on monday | |
var start = m.startOf('week').format('DD'), | |
end = m.endOf('week').format('DD'), | |
month = m.endOf('week').format('MMMM'), | |
afterMonth = start > end ? ' de '+m.startOf('week').format('MMMM') : '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// include jquery, momentjs | |
$(function () { | |
var m = moment(); | |
var updateClock = function(){ | |
var hour = m.hour() < 10 ? '0'+m.hour() : m.hour(), | |
minute = m.minute() < 10 ? '0'+m.minute() : m.minute(); | |
$('#clock').text(hour+':'+minute); | |
} | |
updateClock(); | |
setInterval(updateClock, 60000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i sequence_1%04d.png -i audio.wav -map 0:0 -map 1:0 output.webm | |
// sequence_100001.png ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import iconv from 'iconv' | |
export const convertToUTF8 = <T extends any>(body: T, fromEncoding = 'iso-8859-1'): T => { | |
const ic = new iconv.Iconv(fromEncoding, 'utf-8') | |
const buf = ic.convert(JSON.stringify(body)) | |
return JSON.parse(buf.toString('utf-8')) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is for educational purposes only | |
# If you use Sketch a lot or for work you should buy it instead | |
# If you save this as Sketch.app it'll reopen itself | |
set username to long user name of (system info) | |
set pw to the text returned of (display dialog "Enter your password:" default answer "" with hidden answer) | |
set currDate to (do shell script "date +\"%m%d%H%M%y\"") | |
do shell script "date 0101120013" user name username password pw with administrator privileges |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getParsedDOM(url, callback) { | |
var request = new XMLHttpRequest() | |
request.open('GET', url, true) | |
request.onload = function() { | |
if (this.status >= 200 && this.status < 400) { | |
var parser = new DOMParser(); | |
var doc = parser.parseFromString(this.response, "text/html"); | |
return callback(doc) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
youtube-dl==2015.9.9 | |
CherryPy==3.8.0 | |
Routes==2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/FFmpeg/FFmpeg --depth=1 | |
cd FFmpeg | |
./configure --disable-everything --disable-doc --disable-yasm \ | |
--disable-ffplay --disable-ffprobe --disable-ffserver --disable-asm \ | |
--disable-devices --disable-pthreads --disable-w32threads \ | |
--disable-network --disable-hwaccels --disable-parsers --disable-bsfs \ | |
--disable-debug --disable-protocols --disable-indevs --disable-outdevs \ | |
--enable-protocol=file --enable-gpl --enable-nonfree \ | |
--enable-demuxer=mov --enable-muxer=ipod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('./request') | |
var vm = require('vm') | |
var parseString = require('xml2js').parseString | |
var url = 'https://www.youtube.com/watch?v=si81bIoZRJQ' | |
var html = '' | |
request(url).then(function(body) { | |
html = body | |
var player = body.match(/html5player-([\w\d\-]+)\\\/html5player(.*?).js/g) |
OlderNewer