Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
#!/bin/bash | |
# Usage: gh-rename-master <newbranch> [<remote>] | |
# | |
# Renames the "master" branch of the current repository both locally and on GitHub. | |
# | |
# dependencies: GitHub CLI v0.10 | |
set -e | |
newbranch="${1?}" | |
remote="${2:-origin}" |
find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
Modernizr.load([{ | |
load: [ | |
'//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js' | |
], | |
complete: function() { | |
if (!window.jQuery) { | |
console.log('## CDN Failed - Loading local version of jQuery.'); | |
Modernizr.load('/js/jquery.min.js'); | |
}; | |
} |
// ImageMagick - Convert SVG to PNG w/ transparency | |
// | |
// - open terminal | |
// | |
// - confirm you have imagemagick installed | |
// --- type: convert -v | |
// | |
// - cd to folder | |
// | |
// - single file |
// Stock Android Browser Check >>>>>>>>>>>>>>>> | |
var ua = navigator.userAgent.toLowerCase(); | |
var isAndroid = ua.indexOf("android") > -1 && ua.indexOf("mobile") && ua.indexOf("chrome")==-1 | |
if(isAndroid) { | |
// stuff | |
} |
/* | |
convertVideo_config: { | |
ffmpeg: 'bin/ffmpeg/./ffmpeg', | |
mp4: '-vcodec libx264', | |
m4v: '-vcodec libx264', | |
'3gp': '-acodec libvo_aacenc -vcodec libx264', | |
webm: '-acodec libvorbis -vcodec libvpx', | |
ogv: '-acodec libvorbis' | |
}, |
<!-- | |
Progressive Disclosure Demo - Updated 15 August, 2012 by Ros | |
Thank you for taking a look under the hood of our progressive disclosure demo. Please note that this is a work in progress, so it's a tad messy and bound to change. | |
If you have any questions, feel free to pop a line to [email protected] - we might learn something, too! | |
Known bugs | |
---------- |
window.location.href | |
==================== | |
Bookmarklet to append a string to the end of the URL. | |
1. Create bookmark. | |
2. Edit bookmark URL(Chrome) / Location(Firefox) to include this code: javascript:window.location.href=window.location.href+'REPLACETHIS'; | |
3. Now make use of that bookmarklet. |