⌘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
worker_processes 2; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} |
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
require_relative 'hangman_class' | |
hangman = Hangman.new | |
hangman.start | |
until hangman.finish | |
puts hangman.answer | |
print "#{hangman.limit} Enter your best guess: " | |
hangman.guess(gets) |
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
require_relative 'hangman_class_2' | |
hangman = Hangman.new | |
hangman.start do | |
puts hangman.answer | |
print "#{hangman.limit} Enter your best guest: " | |
hangman.guess(gets) | |
end |
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
require_relative 'hangman_class' | |
require 'test/unit' | |
class TestHangman < Test::Unit::TestCase | |
def test_startup_value | |
Hangman.class_eval do | |
attr_accessor :words, :finish, :limit, :win | |
end | |
hangman = Hangman.new | |
assert(hangman.words.length > 0, "should have more than one in dictionary") |
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
/* Flatten das boostrap */ | |
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
-moz-box-shadow: none !important; | |
-webkit-box-shadow: none !important; | |
box-shadow: none !important; | |
-webkit-border-radius: 0px !important; | |
-moz-border-radius: 0px !important; | |
border-radius: 0px !important; | |
border-collapse: collapse !important; | |
background-image: none !important; |
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 | |
# Hacked together by JeroenJanssens.com on 2013-12-10 | |
# Requires: https://github.com/joewalnes/websocketd | |
# Run: websocketd --devconsole --port 8080 ./chat.sh | |
echo "Please enter your name:"; read USER | |
echo "[$(date)] ${USER} joined the chat" >> chat.log | |
echo "[$(date)] Welcome to the chat ${USER}!" | |
tail -n 0 -f chat.log --pid=$$ | grep --line-buffered -v "] ${USER}>" & | |
while read MSG; do echo "[$(date)] ${USER}> ${MSG}" >> chat.log; done |
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
> curl http://tarantool.org/dist/public.key |apt-key add - | |
> echo "deb http://tarantool.org/dist/master/ubuntu/ trusty main" > /etc/apt/sources.list.d/tarantool.list | |
> apt-get update | |
> apt-get install tarantool luarocks rlwrap | |
> mkdir ~/.luarocks | |
> echo "rocks_servers = {[[http://rocks.tarantool.org/]]}" >> ~/.luarocks/config.lua | |
> luarocks install queue | |
```lua |
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
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
OlderNewer