Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)
- Some utilities:
sudo apt-get install vim tmux git curl
- Copy/paste from the command line:
class FortuneTellerMachine | |
WELCOME = "Hola ¿Quiéres saber tu fortuna?" | |
REQUEST = "Fortuna por monedas, yo quiero yo quiero monedas (2): " | |
CHANGE_BACK = "Here is your change" | |
COST = 2 | |
def initialize | |
clear | |
end |
// Copyright (c) Sergey Lyubka, 2013. | |
// All rights reserved. | |
// Released under the MIT license. | |
// This program is used to embed arbitrary data into a C binary. It takes | |
// a list of files as an input, and produces a .c data file that contains | |
// contents of all these files as collection of char arrays. | |
// Usage: | |
// 1. Compile this file: | |
// cc -o embed embed.c |
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
var functions = { | |
a1: function (number, max) { return print(number + 1, max); }, | |
aNaN: function (number, max) { return null;} | |
}; | |
function print(number, max){ | |
document.write(number + '<br />'); | |
var left = max - number; | |
var index = left/left; | |
return functions['a' + index.toString()](number, max); | |
} |
module CarrierWave | |
module MiniMagick | |
def toaster_filter | |
manipulate! do |img| | |
img.modulate '150,80,100' | |
img.gamma 1.1 | |
img.contrast | |
img.contrast | |
img.contrast | |
img.contrast |
sudo apt-get install vim tmux git curl
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Person = { | |
instance: function(name, lastname) | |
{ | |
var base = this; | |
base._private = {} | |
base._public = {} | |
base._private.name = name; | |
base._private.lastname = lastname; |