⌘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 hidden or 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 hidden or 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 hidden or 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
Play |
This file contains hidden or 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
/* | |
The suggestions for boost::program_options and GNU getopt are good ones. | |
However, for simple command line options I tend to use std::find | |
For example, to read the name of a file after a -f command line argument. You can also just detect if a single-word option has been passed in like -h for help. | |
*/ |
This file contains hidden or 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 hidden or 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 hidden or 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
http://en.wikipedia.org/wiki/Shebang_(Unix) |
This file contains hidden or 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 hidden or 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
file_uploads = On | |
memory_limit = 256M | |
upload_max_filesize = 256M | |
post_max_size = 256M | |
max_execution_time = 600 |