Skip to content

Instantly share code, notes, and snippets.

View babasbot's full-sized avatar

Luis Alfredo Lorenzo babasbot

View GitHub Profile
@gyribeiro
gyribeiro / tmux_italic.md
Last active May 2, 2024 16:28
enable italic font on tmux
@mrrooijen
mrrooijen / database.sslmode.require.yml
Last active February 6, 2024 21:33
SSL configurations for Rails + Postgres in either require or verify-full mode to ensure secure connections. Useful for Amazon RDS, Compose.io, etc.
production:
adapter: postgresql
encoding: unicode
sslmode: require
url: postgres://user:password@host:port/db
@maxivak
maxivak / readme.md
Last active January 12, 2024 06:53
Integrating Gem/Engine and Main Rails App
@skratchdot
skratchdot / midi.json
Last active March 1, 2017 05:44
General Midi Info as a javascript/JSON array. Data From: http://en.wikipedia.org/wiki/General_MIDI#Program_change_events
[ { "val": 0, "name": "Acoustic Grand Piano", "group": "Piano"}
, { "val": 1, "name": "Bright Acoustic Piano", "group": "Piano"}
, { "val": 2, "name": "Electric Grand Piano", "group": "Piano"}
, { "val": 3, "name": "Honky-tonk Piano", "group": "Piano"}
, { "val": 4, "name": "Electric Piano 1", "group": "Piano"}
, { "val": 5, "name": "Electric Piano 2", "group": "Piano"}
, { "val": 6, "name": "Harpsichord", "group": "Piano"}
, { "val": 7, "name": "Clavinet", "group": "Piano"}
, { "val": 8, "name": "Celesta", "group": "Chromatic Percussion"}
@diegovalle
diegovalle / README.md
Last active January 8, 2024 19:24
Topojson of Mexican municipalities and states

How to create the topojson map:

curl -o estados.zip http://mapserver.inegi.org.mx/MGN/mge2010v5_0.zip
curl -o  municipios.zip http://mapserver.inegi.org.mx/MGN/mgm2010v5_0.zip
unzip estados.zip 
unzip municipios.zip
ogr2ogr states.shp Entidades_2010_5.shp -t_srs "+proj=longlat +ellps=WGS84 +no_defs +towgs84=0,0,0"
ogr2ogr municipalities.shp Municipios_2010_5.shp -t_srs "+proj=longlat +ellps=WGS84 +no_defs +towgs84=0,0,0"
topojson -o mx_tj.json -s 1e-7 -q 1e5 states.shp municipalities.shp -p state_code=+CVE_ENT,state_name=NOM_ENT,mun_code=+CVE_MUN,mun_name=NOM_MUN
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')