git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
.DS_Store | |
*.log | |
tmp/ |
from PIL import Image, ImageChops | |
def trim(im, border): | |
bg = Image.new(im.mode, im.size, border) | |
diff = ImageChops.difference(im, bg) | |
bbox = diff.getbbox() | |
if bbox: | |
return im.crop(bbox) | |
def create_thumbnail(path, size): |
/* | |
Copyright (c) 2011 Andrei Mackenzie | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
// jQuery no-double-tap-zoom plugin | |
// Triple-licensed: Public Domain, MIT and WTFPL license - share and enjoy! | |
(function($) { | |
var IS_IOS = /iphone|ipad/i.test(navigator.userAgent); | |
$.fn.nodoubletapzoom = function() { | |
if (IS_IOS) | |
$(this).bind('touchstart', function preventZoom(e) { | |
var t2 = e.timeStamp |
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json" |
Many programming languages, including Ruby, have native boolean (true and false) data types. In Ruby they're called true
and false
. In Python, for example, they're written as True
and False
. But oftentimes we want to use a non-boolean value (integers, strings, arrays, etc.) in a boolean context (if statement, &&, ||, etc.).
This outlines how this works in Ruby, with some basic examples from Python and JavaScript, too. The idea is much more general than any of these specific languages, though. It's really a question of how the people designing a programming language wants booleans and conditionals to work.
If you want to use or share this material, please see the license file, below.
.idea | |
node_modules | |
atlassian-ide-plugin.xml |
################### | |
# compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.pdb | |
*.dll.config | |
*.cache |
#!/bin/bash | |
# encode.sh | |
# | |
# Copyright (c) 2013 Don Melton | |
# | |
# This version published on June 7, 2013. | |
# | |
# Re-encode video files in a format suitable for playback on Apple TV, Roku 3, | |
# iOS, OS X, etc. |