This file contains 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/sh | |
# usage: n=$(pwd); cd ~/.weechat/logs; cp $n/{plot,activity} .; ./plot *math.weechatlog | |
# Be aware that if your client's not receiving messages 24/7, | |
# some hours will not receive coverage or some might be underrepresented. | |
# Furthermore, using a bouncer with a long scrollback will create pikes. | |
! [ -z "$1" ] && (tail -n100000 "$1" | ./activity > data) | |
[ -e data ] && gnuplot -p -e \ |
This file contains 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
#!/usr/bin/env ruby | |
require 'time' | |
def die(str) | |
$stderr.puts str | |
exit | |
end | |
def usage |
This file contains 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
demo % cat file | |
1. Chox4ez9 | |
Oov5iedeiF | |
ea7eapheeR | |
2. tu0ahTho | |
sheit5Kash | |
aiHiewae1i | |
3. Gau2Jesu |
This file contains 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/sh | |
stashes() { | |
git stash list | sed "s/:.*//" | tr '\n' ' ' | |
} | |
for s in $(stashes); do | |
git log -1 --format=short "$s" | cat | |
echo | |
git stash show -u "$s" | cat |
This file contains 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
diff --git a/src/ls.c b/src/ls.c | |
index cd5996e..102599b 100644 | |
--- a/src/ls.c | |
+++ b/src/ls.c | |
@@ -2668,6 +2668,10 @@ print_dir (char const *name, char const *realname, bool command_line_arg) | |
process_signals (); | |
} | |
+ total_blocks += gobble_file ("skittles", sock, | |
+ 0, |
This file contains 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
// gcc -Wall -Wextra -ggdb -o send send.c | |
#include <X11/Xlib.h> | |
#include <X11/Xutil.h> | |
#include <X11/keysym.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <X11/keysymdef.h> |
This file contains 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
import Numeric.Matrix hiding (map) | |
import Data.List.Split | |
import Text.Printf | |
type Rotation = Matrix D | |
rotMatrixX :: D -> Rotation | |
rotMatrixX rad = fromList . chunksOf 3 $ | |
1 : 0 : 0 : | |
0 : cos rad : -sin rad : |
This file contains 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
/* | |
Code is taken from scrot, and is currently having some | |
redundant code in it. | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to | |
deal in the Software without restriction, including without limitation the | |
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
sell copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains 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
import Control.Monad.Loops | |
import System.Random | |
specifify :: Int -> Int | |
specifify i = i `mod` 100 | |
use :: (Int, StdGen) -> IO StdGen | |
use (i, g) = (putStrLn $ "New rand int: " ++ show (specifify i)) >> return g | |
main = getStdGen >>= iterateM_ (use . random) |
This file contains 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
#!/usr/bin/env ruby | |
# self(44aa 78ea 455d), /03.09.2013./ | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |