Skip to content

Instantly share code, notes, and snippets.

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

Maksim Soltan Gonzih

🐁
⠊ ⠁⠍ ⠃⠕⠗⠑⠙ ⠕⠥⠼⠓ ⠕⠋ ⠍⠽ ⠍⠊⠝⠙
View GitHub Profile
@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))
@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 / 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 / as.wsp
Created October 1, 2015 06:45
as-> in wisp
; A bit different from clojure since no lazy sequences
(defmacro as->
[expr name & forms]
`(let [~name ~expr
~@(interleave (repeat (count forms) name) forms)]
~name))
@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
@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 / 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 / cvim.rc
Last active January 5, 2017 10:00
let hintcharacters = "aoeuidhtns"
unmap h j k l d h t n
map d previousTab
map h scrollDown
map t scrollUp
map n nextTab
map k :tabnew<Space>
map j closeTab
@Gonzih
Gonzih / README.md
Last active March 9, 2017 08:12
markov-chain-meetup-dojo