Skip to content
View keybase.md

Keybase proof

I hereby claim:

  • I am ykarikos on github.
  • I am ykk (https://keybase.io/ykk) on keybase.
  • I have a public key whose fingerprint is 2E71 56C3 7760 E735 B175 E053 0E4E A201 3B3A BE42

To claim this, I am signing this object:

View gist:f1e6e208789e300f7adc
(use '[clojure.java.shell :only [sh]])
(defn say [& args] (apply sh "say" args))
(defn say-and-print [n]
(let [n-str (str n)]
(println n-str)
(Thread/sleep 2000)
(say n-str)))
View client repl.clj
user=> (use 'ws-test)
nil
user=> @state
{}
user=> (connect "localhost")
true
user=> @@connection
<< stream: {:type "splice", :sink {:type "netty", :sink? true, :closed? false}, :source {:pending-puts 0, :drained? false, :buffer-size 0, :permanent? false, :type "manifold", :sink? true, :closed? false, :pending-takes 1, :buffer-capacity 16, :source? true}} >>
user=> (send-message @@connection {:msg "It works!" :count 1})
<< true >>
View backup.sh
#!/bin/sh -e
HOME="/home/user"
HOST="foobar"
BACKUP_DIR="/var/backup/$HOST"
BACKUP_FILE="$HOST-`date -I`.tar.bz2.gpg"
MYSQL_FILE="mysql-`date -I`.bak.gpg"
RECIPIENT="me@myhost.com"
cd $BACKUP_DIR
View gist:4ede2106ad196939339d
ykar@FL372:/tmp$ sudo pip uninstall helen_electricity_usage
Uninstalling helen-electricity-usage:
/usr/local/lib/python2.7/site-packages/helen_electricity_usage-0.0.3.dist-info/DESCRIPTION.rst
/usr/local/lib/python2.7/site-packages/helen_electricity_usage-0.0.3.dist-info/METADATA
/usr/local/lib/python2.7/site-packages/helen_electricity_usage-0.0.3.dist-info/RECORD
/usr/local/lib/python2.7/site-packages/helen_electricity_usage-0.0.3.dist-info/WHEEL
/usr/local/lib/python2.7/site-packages/helen_electricity_usage-0.0.3.dist-info/metadata.json
/usr/local/lib/python2.7/site-packages/helen_electricity_usage-0.0.3.dist-info/top_level.txt
/usr/local/lib/python2.7/site-packages/helen_electricity_usage/__init__.py
/usr/local/lib/python2.7/site-packages/helen_electricity_usage/__init__.pyc
View get-timezone-delta.clj
(defn get-timezone-delta [dateformat utc-time-string local-time-string]
(let [utc-time (f/parse dateformat utc-time-string)
local-time (f/parse dateformat local-time-string)
abs-delta (t/in-hours (t/interval (t/earliest utc-time local-time) (t/latest utc-time local-time)))]
(if (t/after? utc-time local-time)
(- abs-delta)
abs-delta)))
View create-tech-radar.py
#!/usr/bin/python
import sys
from math import sin, cos
prefix = """<svg width="800" height="800" xmlns="http://www.w3.org/2000/svg" >
<g transform="translate(400,400)">
<circle r="350" style="fill: rgb(190, 195, 230);"></circle>
</g>
<g transform="translate(400,400)">
View gist:25ebbb38e910c691a52d
-- #!/usr/bin/env runhaskell
import Control.Applicative
import Control.Monad
plus3 x = x + 3
data List a = Nil | Cons a (List a)
deriving (Show)
instance Functor List where
View gist:0a4c13e6e349e2270b86
for f in *.avi; do file=`basename "$f" .avi`; ffmpeg -i "$f" -acodec libfaac -ab 160000 -vcodec libx264 -b 1200k -threads 0 -f mp4 "$file.mp4"; done
View hwoteams.js
// Install:
// npm install lodash request cheerio
// Usage:
// nodejs hwoteams.js
var request = require('request')
, cheerio = require('cheerio');
var fs = require('fs');
var _ = require('lodash');
Something went wrong with that request. Please try again.