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 | |
if [ -z "$2" ]; then | |
echo "Usage: copy_with_links one_or_more_source_files target_directory/" | |
exit 1 | |
fi | |
set -e | |
f=("$@") |
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 <stdio.h> | |
void hash(const unsigned char* buf, size_t len, unsigned long long *hash1, unsigned long long *hash2) | |
{ | |
unsigned long long &h=*hash1; | |
unsigned long long &j=*hash2; | |
size_t l = len; | |
const unsigned char* b = buf; | |
h=0xC0CC3051F486B191; |
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
#define _GNU_SOURCE 1 | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <dlfcn.h> | |
#include <sys/time.h> | |
#include <sys/select.h> | |
#include <time.h> | |
#include <sys/stat.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
#define _GNU_SOURCE 1 | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <dlfcn.h> | |
#include <errno.h> | |
static int (*orig_llseek)( | |
unsigned int fd, unsigned long offset_high, |
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 fd121ea3730530289422566bdae6e77a45402e34 Mon Sep 17 00:00:00 2001 | |
From: Vitaly _Vi Shukela <vi0oss@gmail.com> | |
Date: Wed, 26 Aug 2015 02:22:50 +0300 | |
Subject: [PATCH] libbpg: Implement -noalpha option to skip PNG's alpha channel | |
pngenc command line tool loves PNG. | |
Sometimes users need to convert the picture to png in order | |
to feed it to pngenc. | |
While converting to png, alpha channel may creep in. | |
This makes bpgenc to fail to work in x265 mode and also produce |
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
vi@vi-notebook:/tmp/mod$ git config remote.origin.url | |
http://127.0.0.1/gitmod/ | |
vi@vi-notebook:/tmp/mod$ ~/src/git/git/git push origin master:refs/heads/master | |
Counting objects: 5, done. | |
Writing objects: 100% (3/3), 288 bytes, done. | |
Total 3 (delta 0), reused 0 (delta 0) | |
# it freezes | |
^C | |
vi@vi-notebook:/tmp/mod$ /usr/bin/git push origin master:refs/heads/master | |
Counting objects: 5, done. |
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
vi@vi-notebook:~/_/gittest$ tar -czf /tmp/gittest.tar.gz .git | |
vi@vi-notebook:~/_/gittest$ git reset --hard | |
HEAD is now at 70cd7a6 fix assoc/auth event parsing | |
vi@vi-notebook:~/_/gittest$ git filter-branch --split-submodule headers | |
Rewrite a16340b152a6d3df3a3204adcbfb8d4c7670afa6 (1/261)cat: /home/vi/_/gittest/.git-rewrite/t/../map/: Is a directory | |
Rewrite cf98a6eae1681faa32d0da9fbabfc99707181a61 (6/261)fatal: 90272c0d8b3efd04a5e0666da6d8b8db1be16253 is not a valid 'commit' object | |
vi@vi-notebook:~/_/gittest$ |
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 | |
# Extract subdirectory into a submodule. | |
if [ -z "$1" ]; then | |
echo "Usage: extract-submodule subdirectory" | |
echo "No trailing slash" | |
echo "Should be run from the root directory of repository" | |
echo "Everything should be clean prior to running this script" | |
echo "You need to manually copy submodule somewhere and update .gitmodules file appropriately" | |
exit 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
vi@vi-notebook:~/_$ git clone -b valgrind-failure git://github.com/vi/tcplim.git | |
Cloning into tcplim... | |
... | |
vi@vi-notebook:~/_$ cd tcplim/ | |
vi@vi-notebook:~/_/tcplim$ make | |
gcc -O2 tcplim.c -o tcplim | |
vi@vi-notebook:~/_/tcplim$ socat tcp-l:9998,reuseaddr,fork file:/dev/zero& | |
[1] 11525 | |
vi@vi-notebook:~/_/tcplim$ valgrind ./tcplim 127.0.0.1 9999 127.0.0.1 9998 10000000 10000000 1000000000 1000000000 50 2> log& | |
[2] 11550 |
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
vi@vi-notebook:~/_$ gimp-2.7 2.jpg | |
This is a development version of GIMP. Debug messages may appear here. | |
GLib-ERROR **: /build/buildd-glib2.0_2.24.2-1-i386-AScyie/glib2.0-2.24.2/glib/gmem.c:137: failed to allocate 4096 bytes | |
aborting... | |
gimp-2.7: terminated: Aborted | |
(script-fu:5118): LibGimpBase-WARNING **: script-fu: gimp_wire_read(): error |