This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function redis-del | |
set cmd (status current-command) | |
set _flag_host 'localhost' | |
set _flag_port '6379' | |
set _flag_db '0' | |
argparse 'help' 'h/host=' 'p/port=' 'n/db=' -- $argv | |
if test -n "$_flag_help" -o -z "$argv" | |
test -z "$argv"; and echo -e "missing key!\n" | |
echo "delete multiple keys in a redis at once" | |
echo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -e ' | |
\033[00;32m \\^V// | |
\033[00;33m |\033[01;37m. \033[01;37m.\033[00;33m| \033[01;34m I AM (G)ROOT! | |
\033[00;32m- \033[00;33m\\ - / \033[00;32m_ | |
\033[00;33m \\_| |_/ | |
\033[00;33m \\ \\ | |
\033[00;31m __\033[00;33m/\033[00;31m_\033[00;33m/\033[00;31m__ | |
\033[00;31m|_______| \033[00;37m With great power comes great responsibility. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
let p = 0; | |
const | |
ucb = p => new Promise(r => r(alert('happy new year!'))), | |
l = () => document.addEventListener('keydown', el), | |
cb = () => ucb(document.removeEventListener('keydown', el)).then(l), | |
k = [76,82,85,68,97,98], | |
co = [2,2,3,3,0,1,0,1,5,4], | |
el = e => { | |
p = k[co[p]] - e.key.charCodeAt(Math.min(e.key.length-1, 5)) ? 0 : ++p===10 ? cb()||0 : p; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_greeting | |
if status --is-interactive | |
/home/niko/bin/hi -s | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set fish_term256 1 | |
set -gx PATH ~/bin $PATH | |
if test -z $DISPLAY; and test "$XDG_VTNR" = "1"; and systemctl -q is-active graphical.target | |
exec startx | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns dom.core | |
(:require [clojure.string :as str] | |
[clojure.set :refer [difference union]])) | |
; sample usage: | |
; (-> (all ".class") (hide) (+css "titi") (clear) (html "<span>zob</span>") (show)) | |
(defn- nodelist-coll [nodelist] | |
(doall (map #(.item nodelist %) (range (.-length nodelist))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* trowl.css - niko 2016 */ | |
div.trowl-dock { | |
position: fixed; | |
top: 0; | |
right: 0; | |
max-width: 400px; | |
overflow: hidden; | |
z-index: 9999999; | |
text-align: right; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_prompt | |
set sepcol (set_color -o blue) | |
set hstcol (set_color -o yellow) | |
set pthcol (set_color cyan) | |
set gitcol (set_color normal) | |
if test $USER = "root" | |
set usrcol (set_color red) | |
else | |
set usrcol (set_color -o green) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_right_prompt | |
set -l delay | |
set -l now (date +%s) | |
if set -q __fish_last_prompt | |
set -g dur (math $now - $__fish_last_prompt) | |
if test $dur -lt 120 | |
set delay (printf '%ds' $dur) | |
else if test $dur -lt 3600 | |
set delay (printf '%d:%02d' (math "floor($dur / 60)") (math "$dur % 60")) | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
LIGTHNING FAST CSV ROW COUNT | |
syntax: csvcount filename | |
niko 2015 | |
*/ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <ctype.h> |
NewerOlder