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 / futures.rb
Last active August 29, 2015 14:01
Fun with cuncurrency in jruby
class Future
include java.util.concurrent.Callable
@@executor = java.util.concurrent.Executors::newFixedThreadPool(5)
def initialize(&block)
@block = block
end
def on_success(&block)
@Gonzih
Gonzih / run.sh
Created June 28, 2014 10:22
Run docker inside docker
docker run -v /lib64:/lib64 -v /usr/bin/docker:/usr/bin/docker -v /run/docker.sock:/run/docker.sock -i -t ubuntu:14.04 /bin/bash
# lib64 is specific for opensuse 13.1
@Gonzih
Gonzih / Buildfile.hs
Last active August 29, 2015 14:05
Buildfile for docker containers automation in haskell
module Main where
import Control.Monad (liftM)
import Control.Applicative ((<*>), (<$>))
import System.Directory (getCurrentDirectory, doesFileExist)
import System.Environment (getArgs, getProgName)
import System.FilePath ((</>))
import System.Exit (ExitCode(..), exitWith)
import System.Process (system)
@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]]
@Gonzih
Gonzih / hdfs_repl.nim
Last active August 29, 2015 14:14
HDFS repl thingy
import rdstdin
import os
import strutils
while true:
let input = readLineFromStdin "> "
case input
of "qq":
quit "Bye"
@Gonzih
Gonzih / 1.clj
Created February 10, 2015 16:17
Clsj stacktraces
(require 'cljs.repl)
(in-ns 'cljs.repl)
(def st [;"TypeError: Object [object Object] has no method 'tc'\n"
" at Function.a (<eval>:10008:68)\n"
" at Function.b (<eval>:10008:161)\n"
" at Object.init_state (<eval>:10090:59)\n"
" at <eval>:1:36"])
(def f "public/javascripts/server-side.js")

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:

(set-env!
:src-paths #{"src"})
(deftask halp
"well..."
[]
(fn [continue]
(prn continue)
(fn [event]
(continue event)
@Gonzih
Gonzih / test.bash
Created April 14, 2015 13:31
download speed test
wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test100.zip 2>&1 | grep saved | sed 's/.*(\(.*\)).*/\1/g'
@Gonzih
Gonzih / rpi.clj
Last active August 29, 2015 14:21
rpi.clj
#!/usr/bin/env boot
(require '[clojure.string :as string])
(require '[clojure.java.io :as io])
(require '[clojure.java.shell :as sh])
(def HIGH 1)
(def LOW 0)
(defn LOW? [v] (= LOW v))