Skip to content

Instantly share code, notes, and snippets.

View danielfilho's full-sized avatar

daniel filho danielfilho

View GitHub Profile
@danielfilho
danielfilho / gist:334399
Created March 16, 2010 19:32
JSON gerado pela API do bit.ly
{
"errorCode": 0,
"errorMessage": "",
"results": {
"http://sinmetry.com": {
"hash": "9QHTMa",
"shortCNAMEUrl": "http://bit.ly/aJOHzM",
"shortKeywordUrl": "",
"shortUrl": "http://bit.ly/aJOHzM",
"userHash": "aJOHzM"
@danielfilho
danielfilho / gist:334437
Created March 16, 2010 19:59
Encurtando URL com jQuery e bit.ly
(function($){
// cedendo as informações
var defValues = {
login: '<<usuário bit.ly>>', // para registrar: http://bit.ly/account/register
apiKey: '<<sua API-key>>', // depois de registrar: http://bit.ly/account/your_api_key
version: '2.0.1', // versão compatível com este script
longUrl: '',
history: '0'
};
// criando a URL de requisição
@danielfilho
danielfilho / deliciousbkp.sh
Created December 17, 2010 15:42
To backup all your Delicious links in XML format
# go to terminal
# type the following command, replacing username and password
curl https://{delicious username}:{password}@api.del.icio.us/v1/posts/all > bookmarks.xml
# or type this on your browser
# and save the XML that will load
# https://{your username}:{your password}@api.del.icio.us/v1/posts/all
#Download your Google Apps-hosted email
wget --secure-protocol=TLSv1 --no-check-certificate --user=you@yourdomain.com --password=your_password https://mail.google.com/a/yourdomain.com/feed/atom
@danielfilho
danielfilho / gist:987375
Created May 23, 2011 19:32
Bash scheme
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\e[0;31m\u\e[0;34m @ \e[0;30m\h \e[0;34min \e[0;33m\w\e[0;36m \$(parse_git_branch)\n\e[0m$ "
@danielfilho
danielfilho / jsconf-eu-2011.md
Created October 11, 2011 20:52 — forked from mattpodwysocki/jsconf-eu-2011.md
JSConf.EU Slides
@danielfilho
danielfilho / gameengines.md
Created October 26, 2011 21:25 — forked from bebraw/gameengines.md
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out these pages: [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]].

Name Latest Release Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 1.3.1 (2011/05) 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
Aves Commer-cial Obsolete. Company bought by Zynga. [E3 2010 Aves Engine Prototype "Suburban World"](http://www.
@danielfilho
danielfilho / gyazo.php
Created November 22, 2011 04:32 — forked from cowboy/gyazo.php
PHP upload for Gyazo
<?PHP
/*
* PHP upload for Gyazo - v1.2.1 - 3/13/2011
* http://benalman.com/news/2009/10/gyazo-on-your-own-server/
*
* Copyright (c) 2011 "Cowboy" Ben Alman
* Licensed under the MIT license
* http://benalman.com/about/license/
*/
@danielfilho
danielfilho / fixorientationzoom.js
Created January 6, 2012 00:53 — forked from scottjehl/fixorientationzoom.js
Fix iOS Orientation Change Zoom Bug
/*
An attempt at fixing the dreaded iOS orientationchange zoom bug http://adactio.com/journal/5088/. Seems to work!
Authored by @scottjehl
MIT License.
*/
(function(w){
var doc = w.document;
if( !doc.querySelectorAll ){ return; }
@danielfilho
danielfilho / randomColor.js
Created January 12, 2012 17:53
Random color generator
// originally made by @kriskowal
document.body.backgroundColor = "#" + Math.random().toString(16).slice(2, 8);