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 android.support.annotation.NonNull; | |
import java.io.FilterInputStream; | |
import java.io.IOException; | |
import java.util.zip.GZIPInputStream; | |
/** | |
* GZIPInputStream that works correctly with files more than 2 GiB | |
* <p/> | |
* <p><b>Rationale</b> |
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
// test with: | |
// scl enable devtoolset-3 -- g++ -std=c++11 -g -O0 -fsanitize=address -static-libasan foo.cpp | |
#pragma pack(1) | |
struct TestStruct | |
{ | |
}; | |
#include <regex> |
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 [ -d "$1" ] ; then | |
cd "$1" | |
fi | |
git gc -q | |
git repack -q -a -d --depth=250 --window=250 | |
git prune |
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
digraph test { | |
compound = true; | |
remincross = true; | |
subgraph cluster_g{ | |
"node_g" [shape=point style=invis]; | |
G; | |
}; | |
subgraph cluster_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
From a4e8b94c553940d1a741895a3e6a54deb1f03085 Mon Sep 17 00:00:00 2001 | |
From: theirix <theirix@gmail.com> | |
Date: Sun, 3 May 2015 19:05:41 +0300 | |
Subject: [PATCH] Autodetect correct TidyBodyOnly parameter type | |
Autodetect which version (Int or Bool) should be used. | |
TidyBodyOnly has different types in different versions | |
(tidy 20061031 on OS X and 20091223 on debian). | |
--- | |
src/util.cpp | 22 +++++++++++++++++++++- |
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 2aad6eb0337498fff3e411f514539218d686b8e5 Mon Sep 17 00:00:00 2001 | |
From: theirix <theirix@gmail.com> | |
Date: Sat, 25 Apr 2015 13:01:47 +0300 | |
Subject: [PATCH] Fixed build and runtime tidy errors | |
1. Replaced explicit TidyBuffer init with proper function call. | |
This prevents known error https://cl.ly/WwyM | |
2. Fixed runtime issue with Init/Bool tidy parameter | |
Tested with tidy 20090325 on OS X (debian uses 20091223). | |
--- |
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 | |
# | |
# Script prints gdb stack of the process with a specified pid | |
if [ -z $1 ]; then | |
echo "Usage: $0 pid" | |
exit 1 | |
fi | |
PID=$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
#!/usr/bin/env ruby | |
# | |
# Classify homebrew formulas by origins | |
def repo f | |
STDERR.print '.' | |
`brew info #{f}`.split("\n").map(&:chomp).each do |s| | |
if s =~ /^From: (.*)/ | |
return $1.gsub(/^https:\/\/github.com\/(.*)\/blob\/.*/, '\1') | |
end |
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 | |
find /etc -type f | while IFS= read -r line ; do | |
[ $(echo "$line" | grep -E "^/etc/.git/") ] && continue | |
[ $(echo "$line" | grep -E "^/etc/selinux/") ] && continue | |
dlocate -S "$line" >/dev/null | |
if [ $? != 0 ] ; then | |
if [ "$(apt-file search -l \"$line\" | wc -l)" = "0" ] ; then | |
echo $line -- $(stat -c '%y' $line | cut -f1 -d' ') | |
else | |
echo $line -- dpkg miss, apt-file hit |
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 | |
# pre-receive hook to check damaged unicode encoding of received text files | |
# Wonderful ASCII art is borrowed from the phabricator.com project and licensed by the Apache 2.0 license | |
RESULT=0 | |
while read oldrev newrev refname | |
do | |
OLDIFS=$IFS | |
IFS=$'\n' |