Skip to content

Instantly share code, notes, and snippets.

View Gonzih's full-sized avatar
🤠
ATX

Max Soltan Gonzih

🤠
ATX
View GitHub Profile
@Gonzih
Gonzih / ansible-aur-pkg-installer.md
Last active September 20, 2016 14:26 — forked from cahna/ansible-aur-pkg-installer.md
download, build, and install aur packages with ansible

About

When using ArchLinux, I typically prefer to use an AUR helper like pacaur or yaourt to automate away the process of installing a community package.

Ansible's pacman module is great, but it doesn't support AUR packages or pacman's -U flag. Installing AUR packages with Ansible seemed to be left as an exercise to the user, and since AUR helpers do not come with a fresh Arch install, I

@Gonzih
Gonzih / booboo.clj
Last active March 9, 2016 20:20 — forked from skuro/README.md
We made a boo boo
(ns sytac-dojo.core
(:require [clojure.java.io :as io]
[clojure.string :as string]
[clojure.math.combinatorics :as combo]))
(def volume 150)
(defn read-input! []
(as-> "input.txt" $
(io/resource $)
@Gonzih
Gonzih / gist:fbf3767765a16ce006ff
Last active February 9, 2016 16:19 — forked from schacon/gist:942899
delete all remote branches that have already been merged into master
git branch -r --merged | grep origin | grep -v '>' | grep -v master | xargs -L1 | awk '{sub(/origin\//,"");print}' | xargs git push origin --delete

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@Gonzih
Gonzih / nonograms.clj
Last active August 29, 2015 14:11 — forked from skuro/nonograms.clj
(ns dojo-elmar.core)
(def problem
{ :size [10 10]
:rows [[] [1 1] [1] [2 1 1] [1 1 1] [1 2 1 1] [1] [1] [] []]
:cols [[] [1] [] [3] [1 1] [] [5] [1] [1 4] []] })
(def problem1x1
{:size [2 2]
:rows [[1] [1]]
--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/(^|=[ \t])*class ([A-Za-z]+\.)*([A-Za-z]+)( extends [A-Za-z_.]+)?$/\3/c,class/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?@?([A-Za-z_.]+):.*[-=]>.*$/\3/m,method/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?([A-Za-z_.]+)[ \t]+=.*[-=]>.*$/\3/f,function/
--regex-coffee=/^[ \t]*([A-Za-z_.]+)[ \t]+=[^->\n]*$/\1/v,variable/
--regex-coffee=/^[ \t]*@([A-Za-z_.]+)[ \t]+=[^->\n]*$/\1/f,field/
--regex-coffee=/^[ \t]*@([A-Za-z_.]+):[^->\n]*$/\1/f,static field/
--regex-coffee=/^[ \t]*([A-Za-z_.]+):[^->\n]*$/\1/f,field/
@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
@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 / 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")