Skip to content

Instantly share code, notes, and snippets.

View Gonzih's full-sized avatar
🐁
⠊ ⠁⠍ ⠃⠕⠗⠑⠙ ⠕⠥⠼⠓ ⠕⠋ ⠍⠽ ⠍⠊⠝⠙

Maksim Soltan Gonzih

🐁
⠊ ⠁⠍ ⠃⠕⠗⠑⠙ ⠕⠥⠼⠓ ⠕⠋ ⠍⠽ ⠍⠊⠝⠙
View GitHub Profile
@Gonzih
Gonzih / 10-evdev.conf
Created January 11, 2014 17:54
Logitech Marble Mouse Configuration (append section to file)
#/etc/X11/xorg.conf.d/10-evdev.conf
Section "InputClass"
Identifier "Marble Mouse"
MatchProduct "Logitech USB Trackball"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
# Physical button #s: A b D - - - - B C b = A & D simultaneously; - = no button
# Option "ButtonMapping" "1 8 3 4 5 6 7 2 2"
@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 / hn-aeson.hs
Last active September 30, 2016 15:23
Aeson HN example of nested JSON (unoptimized binary ~20 mb)
{-# LANGUAGE OverloadedStrings #-}
import Data.Aeson
import Control.Applicative ((<$>), (<*>))
import Control.Monad (mzero)
import Network.HTTP.Conduit
import Data.ByteString.Lazy.Internal (ByteString(..))
data Item = Item { title :: String
, url :: String
@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)