Skip to content

Instantly share code, notes, and snippets.

View gbertb's full-sized avatar

Gilbert Bagaoisan gbertb

  • San Francisco, CA
View GitHub Profile
@gbertb
gbertb / Default (OSX).sublime-keymap
Created October 15, 2012 22:10 — forked from stilist/Default (OSX).sublime-keymap
Sublime Text 2 preferences
[
// Drawn from http://www.sublimetext.com/forum/viewtopic.php?f=2&t=7477#p31755
// Kills the annoying default of cmd-left jumping to the start of a line's
// code, rather than column 0.
{ "keys": ["super+left"], "command": "move_to", "args": {"to": "hardbol", "extend": false} },
{ "keys": ["super+right"], "command": "move_to", "args": {"to": "hardeol", "extend": false} }
]
/*********************************************************************
* #### Twitter Post Fetcher v7.0 ####
* Coded by Jason Mayes 2013. A present to all the developers out there.
* www.jasonmayes.com
* Please keep this disclaimer with my code if you use it. Thanks. :-)
* Got feedback or questions, ask here:
* http://www.jasonmayes.com/projects/twitterApi/
* Updates will be posted to this site.
*********************************************************************/
var twitterFetcher=function(){function t(d){return d.replace(/<b[^>]*>(.*?)<\/b>/gi,function(c,d){return d}).replace(/class=".*?"|data-query-source=".*?"|dir=".*?"|rel=".*?"/gi,"")}function m(d,c){for(var f=[],e=RegExp("(^| )"+c+"( |$)"),g=d.getElementsByTagName("*"),b=0,a=g.length;b<a;b++)e.test(g[b].className)&&f.push(g[b]);return f}var u="",j=20,n=!0,h=[],p=!1,k=!0,l=!0,q=null,r=!0;return{fetch:function(d,c,f,e,g,b,a){void 0===f&&(f=20);void 0===e&&(n=!0);void 0===g&&(g=!0);void 0===b&&(b=!0);
@gbertb
gbertb / gradient-line.html
Created July 17, 2013 20:13
gradient horizontal line
hr {
border: none;
border-top: 1px solid #eee;
height: 5px;
background: -webkit-radial-gradient(50% 0%, 50% 5px, #aaa 0%, white 100%);
}
@gbertb
gbertb / multiple_ssh_setting.md
Created September 6, 2013 05:59 — forked from jexchan/multiple_ssh_setting.md
Good way to use multiple SSH for github

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
<?php
/**
* Usage:
* Send the url you want to access url encoded in the url paramater, for example (This is with JS):
* /twitter-proxy.php?url='+encodeURIComponent('statuses/user_timeline.json?screen_name=MikeRogers0&count=2')
*/
// The tokens, keys and secrets from the app you created at https://dev.twitter.com/apps
$config = array(
@gbertb
gbertb / new_gist_file
Created September 18, 2013 07:21
copy message urls in apple mail
tell application "Mail"
set _sel to get selection
set _links to {}
repeat with _msg in _sel
set _messageURL to "message://%3c" & _msg's message id & "%3e"
set end of _links to _messageURL
end repeat
set AppleScript's text item delimiters to return
set the clipboard to (_links as string)
end tell
@gbertb
gbertb / package.json
Created September 23, 2013 06:01
socket.io + express + sessions
{
"name": "soup_realtime",
"version": "0.1.0",
"description": "realtime server",
"main": "realtime-server.js",
"scripts": {
"test": "echo \"Error: no test specified! Configure in package.json\" && exit 1"
},
"repository": "",
"dependencies": {
@gbertb
gbertb / gist:7090629
Last active December 26, 2015 04:09 — forked from g3d/gist:2709563
Clean install for Mac OSX Mavericks
@gbertb
gbertb / javascript_resources.md
Created October 29, 2013 18:36 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@gbertb
gbertb / python_resources.md
Created October 29, 2013 18:36 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides