⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
/************************************************************** | |
* 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 |
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
# 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 |
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
daemon off; | |
events { | |
worker_connections 4096; ## Default: 1024 | |
} | |
http { | |
include mime.types; | |
# serve static files when asked to | |
sendfile on; |
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
# 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 |
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
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: |
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
#!/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/ |
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
def s a | |
a.sort_by{rand} | |
end | |
def z s | |
s.tr('.,;[](){}','ailrtuens').split(" ") | |
end | |
t = s(z("I]á;,. F[.{ç. A;)m.{h. Po[](g.; B[.},; A[g){],{. I{g;.])[[. Uc[â{,. E}p.{h. Ho;.{d. S(íç. S(éc,. A(}][á;,. Méx,co U[(g(., G.{.")) | |
z("O,].v.} d) f,{.; Q(.[].} d) f,{.; S)m,f,{.; F,{.;").map do |f| | |
puts "\n#{f}" | |
t = t.enum_slice(2).map do |i,j| |
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
def tip(msg); puts; puts msg; puts "-"*100; end | |
# | |
# 30 Ruby 1.9 Tips, Tricks & Features: | |
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/ | |
# | |
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2" | |
tip "Ruby 1.9 supports named captures in regular expressions!" |
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
This is an example of using RVM's Project .rvmrc file | |
to have it automatically bootstrap your environment, including bundler. | |
This could be further expanded to do anything you require :) | |
The important thing to remember is that the purpose of these files is | |
to allow you to very easily have your 'project context' (aka 'environment') | |
loaded automatically for you when you enter the project in the shell (cd). | |
You can generate the .rvmrc file below by running: |
NewerOlder