Skip to content

Instantly share code, notes, and snippets.

View Gonzih's full-sized avatar
🤠
ATX

Maksim Soltan Gonzih

🤠
ATX
View GitHub Profile
@Gonzih
Gonzih / template.rb
Created April 25, 2011 11:55
Rails Template
# for 3.0 rails
# create rvmrc file
create_file ".rvmrc", "rvm 1.9.2"
gem "jquery-rails"
gem "postgres"
#gem "kaminari"
#gem "carrierwave"
#gem "resque"
@Gonzih
Gonzih / gist:1119988
Created August 2, 2011 10:34
hon pkgbuild
## PKGBUILD [plain_text]
# Contributor: Slash <demodevil5 [at] yahoo [dot] com>
pkgname=hon
pkgver=2.1.0.1
pkgrel=1
pkgdesc="Heroes of Newerth is a Real Time Strategy game heavily influcenced by DotA"
arch=('i686' 'x86_64')
url="http://www.heroesofnewerth.com/"
license=('custom:HoN')
@Gonzih
Gonzih / include_root_in_json.rb
Created September 3, 2011 07:32
Rails include_root_in_json initializer
ActiveRecord::Base.include_root_in_json = false
# {"post": {"title": "some title", "content": "some content"}}
# will be
# {"title": "some title", "content": "some content}
@Gonzih
Gonzih / rspec-syntax-cheat-sheet.rb
Created June 27, 2012 07:03 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@Gonzih
Gonzih / rspec-syntax-cheat-sheet.rb
Created June 27, 2012 07:03 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@Gonzih
Gonzih / debug.clj
Created December 4, 2012 12:01 — forked from flashingpumpkin/debug.clj
Simpler debug-repl that works with unmodified Clojure
;; Inspired by George Jahad's version: http://georgejahad.com/clojure/debug-repl.html
(defmacro local-bindings
"Produces a map of the names of local bindings to their values."
[]
(let [symbols (map key @clojure.lang.Compiler/LOCAL_ENV)]
(zipmap (map (fn [sym] `(quote ~sym)) symbols) symbols)))
(declare *locals*)
(defn eval-with-locals
@Gonzih
Gonzih / README.md
Created December 4, 2012 12:04
Arduino QSteer
@Gonzih
Gonzih / ir_read.pde
Created December 4, 2012 12:07
Arduino IR Read/Write
#define DEBUG
#define ARR_SIZE 200
int readPin = 11, debugPin = 13, writePin = 10;
// Debuging
#ifdef DEBUG
void debug() {
digitalWrite(debugPin, digitalRead(readPin));
}
@Gonzih
Gonzih / .gitignore
Created December 16, 2012 14:24
4 Course PHP KR
db/table*.data
uploads/
@Gonzih
Gonzih / flip.clj
Last active December 10, 2015 12:48 — forked from anonymous/flip.clj
(defn flip
"Flips a functions argument list."
[f] (fn [& args] (apply f (reverse args))))
;Slightly shorter implementation by Anthony Grimes @IORayne
(defn flip [f] #(apply f (reverse %&)))
(def my-gt (flip >))
(> 10 9); => true
(my-gt 10 9); => false