Skip to content

Instantly share code, notes, and snippets.

@lcosta
lcosta / download
Created March 31, 2012 14:42 — forked from guzart/download
bash: Download and Compress Rails API
#!/bin/bash
rm -rf api.rubyonrails.org/
wget -r -k -p http://api.rubyonrails.org/
rm rails_api.rar
rar a -r rails_api.rar api.rubyonrails.org/
@lcosta
lcosta / gist:4134809
Created November 23, 2012 09:47 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
If you switch to kaminari,
http://railscasts.com/episodes/254-pagination-with-kaminari
...the lines added to application.js become redundant when you implement the pager like in this demo project:
https://github.com/amatsuda/kaminari_example/tree/ajax
in index.html:
@lcosta
lcosta / Makefile
Created March 7, 2013 22:31 — forked from zacharyvoase/Makefile
Makefile for arduino uno R3
# Basic AVR Makefile
# Author: Zachary Voase
# License: Public Domain <http://unlicense.org/>
#
# Configured to work with the Arduino Uno R3, programmed from a Mac, using
# CrossPack (http://www.obdev.at/products/crosspack/index.html).
# This needs to be the TTY device on your Mac at which the Arduino is mounted.
# Mine is normally either 1421 or 1411.
PORT = /dev/tty.usbmodem1421
@lcosta
lcosta / nginx.conf
Last active August 29, 2015 14:26 — forked from ryanstout/nginx.conf
daemon off;
events {
worker_connections 4096; ## Default: 1024
}
http {
include mime.types;
# serve static files when asked to
sendfile on;
@lcosta
lcosta / Folder Preferences
Created May 31, 2018 10:35 — forked from chrisyour/Folder Preferences
Show hidden files and hidden folders (except .git) in your TextMate project drawer
# Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences.
# Instructions:
# Go to TextMate > Preferences...
# Click Advanced
# Select Folder References
# Replace the following:
# File Pattern
@lcosta
lcosta / WebSocketClientSocketIO.ino
Created August 19, 2020 09:59 — forked from Tolerant/WebSocketClientSocketIO.ino
TinyGSM: Web Socket Client for Socket.io
/**************************************************************
* WebSocketClient SocketIO
* TinyGSM Getting Started guide:
* http://tiny.cc/tiny-gsm-readme
*
**************************************************************/
// Select your modem:
#define TINY_GSM_MODEM_SIM800
// #define TINY_GSM_MODEM_SIM808