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 config --global core.excludesfile ~/.gitignore | |
$ echo .DS_Store >> ~/.gitignore |
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
<?php | |
/* | |
By Marco Arment <me@marco.org>. | |
This code is released in the public domain. | |
THERE IS ABSOLUTELY NO WARRANTY. | |
*/ | |
class Bcrypt { | |
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
<?php | |
/** | |
* Grab the url of a publicly embeddable video hosted on vimeo | |
* @param str $video_url The "embed" url of a video | |
* @return str The url of the thumbnail, or false if there's an error | |
*/ | |
function grab_vimeo_thumbnail($vimeo_url){ | |
if( !$vimeo_url ) return false; | |
$data = json_decode( file_get_contents( 'http://vimeo.com/api/oembed.json?url=' . $vimeo_url ) ); |