I hereby claim:
- I am matthewhudson on github.
- I am matthewhudson (https://keybase.io/matthewhudson) on keybase.
- I have a public key whose fingerprint is 7B45 9A21 41FC FCD3 46EF B079 43BE B01D 5135 4390
To claim this, I am signing this object:
During discussions of syncing, the chance that someone will mention #git approach 1 |
crypto = require 'crypto' | |
key = 'monkeybutt' | |
cipher = crypto.createCipher 'aes128', key | |
decipher = crypto.createDecipher 'aes128', key | |
encrypt = (plaintext) -> | |
encrypted = cipher.update plaintext, 'utf8', 'base64' | |
encrypted += cipher.final 'base64' |
# Note that when compiling with coffeescript, the plugin is wrapped in another | |
# anonymous function. We do not need to pass in undefined as well, since | |
# coffeescript uses (void 0) instead. | |
do ($ = jQuery, window, document) -> | |
# window and document are passed through as local variable rather than global | |
# as this (slightly) quickens the resolution process and can be more efficiently | |
# minified (especially when both are regularly referenced in your plugin). | |
# Create the defaults once |
I hereby claim:
To claim this, I am signing this object:
/*jslint browser: true, indent: 2 */ | |
'use strict'; | |
// Device.js | |
// (c) 2014 Matthew Hudson | |
// Device.js is freely distributable under the MIT license. | |
// For all details and documentation: | |
// http://matthewhudson.me/projects/device.js/ |
Verifying that +matthewhudson is my openname (Bitcoin username). https://onename.io/matthewhudson |
import uuid | |
import hashlib | |
import base64 | |
def generate_unique_id(): | |
return base64.b32encode( | |
hashlib.sha256(uuid.uuid4().bytes).digest())[:12].lower() | |
def generate_access_token(): | |
return base64.b32encode(hashlib.sha256(uuid.uuid4().bytes).digest())[:52] |
import ffmpeg form 'fluent-ffmpeg'; | |
const filePath = '/Users/yoann/Desktop/video.avi'; | |
const route = (req, res) => { | |
res.writeHead(200, getHeaders({'Content-Type': 'video/mp4'})); | |
ffmpeg(filePath) | |
.format('mp4') | |
.addOptions([ | |
'-movflags frag_keyframe+faststart' | |
]) |
/* | |
Found these unfamiliar `--` prefixes on a page and started researching: https://www.learn-html.org/en/Basic_Elements | |
You can prefix a double dash to define custom CSS properties: https://drafts.csswg.org/css-variables/ | |
Browser support is solid: https://caniuse.com/#feat=css-variables | |
*/ | |
:root { | |
--blue: #000; | |
--indigo: #6610f2; | |
--purple: #6f42c1; | |
--pink: #e83e8c; |