Skip to content

Instantly share code, notes, and snippets.

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

Nikolay Burlov kohgpat

🤖
...
  • Russia, Siberia
View GitHub Profile
@kohgpat
kohgpat / mohttpd.asm
Created October 30, 2012 23:51
My Own HTTP Daemon by Neill Corlett
;
; My Own HTTP Daemon
; A web server for i386 Linux because I was bored
; Copyright (C) 2012 Neill Corlett
;
; This program is free software: you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free Software
; Foundation, either version 3 of the License, or (at your option) any later
; version.
;
@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");
};
const delay = (ms) = new Promise(resolve => setTimeout(resolve, ms));
@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 / gist:7260506
Created November 1, 2013 03:12
ruby mavericks gcc not found fix
xcode-select --install
brew install apple-gcc42
@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 / 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

require 'redis'
require 'json'
require 'celluloid'
require 'celluloid/io'
class RedisAdapter
include Celluloid
def initialize(redis)
@redis = redis
@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)
/*
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