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
From 7959a97980894e1a47361e566d234a5f341dd05d Mon Sep 17 00:00:00 2001 | |
From: Vitaly _Vi Shukela <vi0oss@gmail.com> | |
Date: Tue, 29 Nov 2011 19:29:50 +0300 | |
Subject: [PATCH] Strace-based speed limiter | |
Apply to strace-4.6 | |
Set env SPEEDLIMIT_READ=1000 and slow down other process with strace | |
Example: SPEEDLIMIT_READ=$((200*1024)) ./strace -o /dev/null -p `pidof wget` | |
--- |
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
From vi0oss@gmail.com Thu Feb 16 21:43:27 2012 | |
Content-Type: text/plain; charset="us-ascii" | |
MIME-Version: 1.0 | |
Content-Transfer-Encoding: 7bit | |
Subject: [PATCH] Switch between measuring wall-clock time and CPU time with | |
YAPPI_CPUTIME environment variable | |
X-Mercurial-Node: f73ffd1c1bed66f0a95b39460788cc411ddc1003 | |
Message-Id: <f73ffd1c1bed66f0a95b.1329417806@localhost> | |
User-Agent: Mercurial-patchbomb/1.6.4 | |
Date: Thu, 16 Feb 2012 21:43:26 +0300 |
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
v@l:20:30:10:/tmp/gittest$ git init | |
Initialized empty Git repository in /tmp/gittest/.git/ | |
v@l:20:30:12:/tmp/gittest$ echo q > q && git add q && git commit -m q | |
[master (root-commit) 9d49ad5] q | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
create mode 100644 q | |
v@l:20:30:16:/tmp/gittest$ echo q2 > q && git add q && git commit -m q2 | |
[master 27cc7c1] q2 | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
v@l:20:30:23:/tmp/gittest$ git rebase -i HEAD^ |
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 -ur <(printf 'a\nb\nc\n') <(printf 'a\nd\nc\n') | |
--- /dev/fd/63 2012-03-08 02:27:23.088325870 +0300 | |
+++ /dev/fd/62 2012-03-08 02:27:23.088325870 +0300 | |
@@ -1,3 +1,3 @@ | |
a | |
-b | |
+d | |
c | |
$ git diff --no-index <(printf 'a\nb\nc\n') <(printf 'a\nd\nc\n') | |
diff --git a/dev/fd/63 b/dev/fd/62 |
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
/* | |
* Read limited subset of matroska files (generated by udp2mkv) and stream them to network as UDP packets | |
* | |
* Limitations: | |
* 1. cluster size is 5 bytes: 08 NN NN NN NN | |
* 2. Each cluster have only two elements: Timecode and SimpleBlock | |
* 3. Timecode have size 8 bytes and it is microseconds (timecode scale = 1000) | |
* 4. SimpleBlock have size as 5 bytes: 08 NN NN NN NN | |
* 5. There is only one track and it is track number 1 | |
* 6. No lacing |
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/perl | |
# Removes alpha channel from BPG v0.9.3- image, so it can be decoded with libbpg v0.9.4+. | |
# Implemented by Vitaly "_Vi" Shukela in 2015 | |
# License: MIT | |
read STDIN,$_,4; | |
my $magic=unpack("N", $_); | |
printf STDERR "magic: %08X\n", $magic; | |
print STDOUT pack("N", $magic); |
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/bash | |
# git wrapper, to auto-supply --reference to `git clone` | |
# edit the table below to suit your setup | |
LOG=/tmp/git.log | |
echo git: "$@" >> "$LOG" | |
CLONE=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
-- "cabal install vector-fftw split" | |
import qualified Numeric.FFT.Vector.Unnormalized as FFT | |
import Data.Vector (fromList, toList) | |
import Data.List.Split (splitOneOf) | |
import Data.List (intersperse) | |
import Control.Monad (forever) | |
import Control.Arrow ((>>>)) | |
main = forever $ |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
int main(int argc, char* argv[]) { | |
if (argc<3) { | |
fprintf(stderr, "Usage uksm_tease page_size number_of_pages < /dev/urandom\n"); | |
return 1; | |
} |
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
/* Y combinator for Rust. | |
Implemented by Vitaly "_Vi" Shukela. | |
$ rustc --version | |
rustc 0.6 (5f13e9c 2013-04-02 13:36:51 -0700) | |
host: i686-unknown-linux-gnu | |
*/ | |
type Yfunc<T> = @fn(x:T) -> T; | |
type Yfunc2<T> = @fn(f: Yfunc<T>, x:T) -> T; |