Skip to content

Instantly share code, notes, and snippets.

View kohgpat's full-sized avatar
🤖
...

Nikolay Burlov kohgpat

🤖
...
  • Russia, Siberia
View GitHub Profile
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
@kohgpat
kohgpat / hash.rb
Created March 29, 2013 02:49
core_ext/hash.rb
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
@kohgpat
kohgpat / app.js
Created September 23, 2013 07:25
angular.js currency filter using accounting.js
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: ""
},
@kohgpat
kohgpat / app.js
Created September 23, 2013 07:48
angular.js date filter using moment.js
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");
};
@kohgpat
kohgpat / cv.md
Created September 24, 2013 15:04

Nikolay Burlov

Software Developer

@kohgpat at GitHub

Technologies

Backend development - Ruby, Sinatra, Ruby on Rails
Frontend development - CoffeeScript/JavaScript, jQuery, Angular.js
Databases - PostgreSQL, MySQL, MSSQL, MongoDB, Redis

@kohgpat
kohgpat / app.css
Last active December 26, 2015 12:29
twitter bootstrap layout with sidebar
/* twitter bootstrap */
.container {
max-width: 100%;
}
/* html */
html, body {
height: 100%;
}
@kohgpat
kohgpat / gist:7260506
Created November 1, 2013 03:12
ruby mavericks gcc not found fix
xcode-select --install
brew install apple-gcc42