Skip to content

Instantly share code, notes, and snippets.


Fabio Yamate fabioyamate

View GitHub Profile
View sha-256-hex-password
# TODO would it be possible to write in one line?
echo "Password: "
read -s password
echo -n $password | openssl dgst -sha256 -binary | xxd -p
View xmobarrc
Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
, borderColor = "black"
, border = TopB
, bgColor = "black"
, fgColor = "grey"
, position = TopW L 100
, commands = [ Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
cat <(`dd bs=1024 count=64 if=$foo`) <(`tail -c 65536 $foo`) | md5
fabioyamate /
Created Feb 21, 2016
keybase prove github

Keybase proof

I hereby claim:

  • I am fabioyamate on github.
  • I am fabioyamate ( on keybase.
  • I have a public key ASCozQOWUcCj_hY3NCJ60wJIR0BMIfMVE5AVlC8I_PCkCgo

To claim this, I am signing this object:

fabioyamate / core.clj
Created Aug 31, 2015
Stub HTTP server
View core.clj
(ns stubhttp.core
(:require [ring.adapter.jetty :as r]
[ring.middleware.json :as json]
[ring.util.response :as response]))
(def state (atom {}))
(defn register! [{uri "uri" {:strs [status headers body]} "response"}]
(swap! state assoc uri {:status status :headers headers :body body}))
View .screenrc
# Turn off start message
startup_message off
termcapinfo rxvt-unicode 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
term screen
# Message to display in the status line when activity is detected in a
# monitored window.
fabioyamate / datomic-queries.clj
Created Apr 30, 2015
Datomic Queries cheat-sheet
View datomic-queries.clj
;;; Replace entity with the schema
{:find [...]
:in [...]
:where [...]}
;;; eav
[?e ?a ?v ?tx]
;;; txInstant
fabioyamate / event_target.js
Created Dec 19, 2014
EventTarget mixin module
View event_target.js
// draft
(function(exports) {
var ArrayProto = Array.prototype;
var nativeSlice = ArrayProto.slice,
nativeFilter = ArrayProto.filter;
/* Internal: filters the collection. (extracted from underscore.js)
View affix-sandbox.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>jQuery Snippet</title>
<link rel="stylesheet" href="">
#text {height: 100%; background-color: pink}
#header { background-color: red; }
#header.affix {
View nth-last-child.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
li:nth-last-child(3) { background-color: red; }
<div id="container">