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 bash | |
# | |
# [git] convert repo to bare | |
# | |
set -e | |
if [ "$1" = "" ]; then | |
echo "Set directory" |
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<iostream> | |
#include "mergesort.c" | |
using namespace std; | |
int main(int argc, char** argv) { | |
int num; | |
cout << "How many numbers do you want to sort: "; | |
cin >> num; | |
int a[num]; | |
for (int i = 0; i < num; i++) { |
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 bash | |
# | |
# Original is here https://raw.github.com/azat/boostcache/master/benchmarks/one_connection.sh | |
# | |
set -e | |
if ! $( pidof boostcached &> /dev/null ); then | |
echo "First start boostcached" |
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/python | |
import ctypes | |
import ctypes.util | |
c_off_t = ctypes.c_int64 | |
def make_fallocate(): | |
libc_name = ctypes.util.find_library('c') | |
libc = ctypes.CDLL(libc_name) |
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 php | |
<? | |
/** | |
* From https://github.com/azat/scripts/blob/master/block_grep.php | |
*/ | |
if ($argc < 3) { | |
fprintf(STDERR, "Usage: %s [-v | --invert-match] pattern file-name\n", | |
$argv[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
[log] | |
decorate = short | |
[color] | |
ui = auto | |
[pager] | |
status = true | |
show-branch = true | |
[rebase] | |
autosquash = true |
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
azat:/tmp$ wget https://gist.github.com/Qolt/5614809/raw/5d2d29292cb3fff8243202973f5db936117a6e1e/modeling.py | |
--2013-05-20 23:32:56-- https://gist.github.com/Qolt/5614809/raw/5d2d29292cb3fff8243202973f5db936117a6e1e/modeling.py | |
Resolving gist.github.com (gist.github.com)... 204.232.175.94 | |
Connecting to gist.github.com (gist.github.com)|204.232.175.94|:443... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: unspecified [text/plain] | |
Saving to: ‘modeling.py’ | |
[ <=> ] 3,538 --.-K/s in 0s |
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 | |
do_usage () { | |
cat << _EOF | |
Usage: populate-extfs.sh <source> <device> | |
Create an ext2/ext3/ext4 filesystem from a directory or file | |
source: The source directory or file | |
device: The target device |
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/sbin/dtrace -s | |
pid$1::*executeCommand*:entry | |
{ | |
printf("query enter\n") | |
} | |
pid$1::*executeCommand*:return | |
{ |