@kohgpat at GitHub
Backend development - Ruby, Sinatra, Ruby on Rails
Frontend development - CoffeeScript/JavaScript, jQuery, Angular.js
Databases - PostgreSQL, MySQL, MSSQL, MongoDB, Redis
class Finder | |
def self.find(query) | |
people = [] | |
conditions = [] | |
words = query.split(' ') | |
case words.count | |
when 1 | |
conditions << ["id = ?", query] |
data:text/html, <html><style> body { font-family: PragmataPro }</style><body contenteditable> |
/* | |
This document has been created with Marked.app <http://markedapp.com>, Copyright 2011 Brett Terpstra | |
Please leave this notice in place, along with any additional credits below. | |
--------------------------------------------------------------- | |
Upstanding Citizen by Brett Terpstra | |
Non-standard fonts used: | |
* OSPDIN | |
* League Gothic | |
* Fjord | |
* Inconsolata |
class Hash | |
def symbolize_keys | |
inject({}) do |options, (key, value)| | |
options[(key.to_sym rescue key) || key] = value | |
options | |
end | |
end | |
def symbolize_keys! | |
self.replace(self.symbolize_keys) |
require 'redis' | |
require 'json' | |
require 'celluloid' | |
require 'celluloid/io' | |
class RedisAdapter | |
include Celluloid | |
def initialize(redis) | |
@redis = redis |
angular.module("app.users", ["ngResource"]).factory("Users", function($resource) { | |
return $resource("users.json", {}, {get: {method: "GET", isArray: true}}); | |
}); | |
angular.module("app.filters", []).filter("currency", function() { | |
return function(number, currencyCode) { | |
var currency = { | |
USD: "$", | |
RUB: "" | |
}, |
angular.module("app.users", ["ngResource"]).factory("Users", function($resource) { | |
return $resource("users.json", {}, {get: {method: "GET", isArray: true}}); | |
}); | |
angular.module("app.filters", []).filter("date", function() { | |
moment.lang("ru"); | |
return function(date) { | |
return moment(new Date(date)).format("L"); | |
}; |
Backend development - Ruby, Sinatra, Ruby on Rails
Frontend development - CoffeeScript/JavaScript, jQuery, Angular.js
Databases - PostgreSQL, MySQL, MSSQL, MongoDB, Redis
/* twitter bootstrap */ | |
.container { | |
max-width: 100%; | |
} | |
/* html */ | |
html, body { | |
height: 100%; | |
} |
xcode-select --install | |
brew install apple-gcc42 |