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 / echo_server.clj
Created September 16, 2015 17:05
Clojure UDP datagram server example
(ns echo-server
(:import (java.net InetAddress DatagramPacket DatagramSocket)))
(defonce udp-server (atom nil))
(defonce state (atom []))
(def port 1111)
(defn localhost [] (.getLocalHost InetAddress))
@Gonzih
Gonzih / INSTALLED_PACKAGES
Created August 19, 2015 14:54
OpenWRT WR841N v9 packages without ipv6 for image builder
base-files busybox dnsmasq dropbear firewall fstools hostapd-common -ip6tables iptables iw iwinfo jshn jsonfilter kernel kmod-ath kmod-ath9k kmod-ath9k-common kmod-cfg80211 kmod-crypto-aes kmod-crypto-arc4 kmod-crypto-core kmod-gpio-button-hotplug -kmod-ip6tables kmod-ipt-conntrack kmod-ipt-core kmod-ipt-nat -kmod-ipv6 kmod-ledtrig-usbdev kmod-lib-crc-ccitt kmod-mac80211 kmod-nf-conntrack -kmod-nf-conntrack6 kmod-nf-ipt -kmod-nf-ipt6 kmod-nf-nat kmod-nf-nathelper kmod-nls-base kmod-ppp kmod-pppoe kmod-pppox kmod-slhc kmod-usb-core kmod-usb-ohci kmod-usb2 libblobmsg-json libc libgcc libip4tc -libip6tc libiwinfo libiwinfo-lua libjson-c libjson-script liblua libnl-tiny libubox libubus libubus-lua libuci libuci-lua libxtables lua luci luci-app-firewall luci-base luci-lib-ip luci-lib-nixio luci-mod-admin-full -luci-proto-ipv6 luci-proto-ppp luci-theme-bootstrap mtd netifd -odhcp6c odhcpd opkg ppp ppp-mod-pppoe procd rpcd swconfig uboot-envtools ubox ubus ubusd uci uhttpd uhttpd-mod-ubus usign wpad-mini qos-scripts
@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))
@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'
(set-env!
:src-paths #{"src"})
(deftask halp
"well..."
[]
(fn [continue]
(prn continue)
(fn [event]
(continue event)

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 / 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")
@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 / 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 / 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)