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 python | |
from __future__ import print_function | |
import collections | |
GROUPS_COUNT = 7 | |
cleaned_words = set() | |
# |
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 | |
pip install -t /tmp/test_install -i http://localhost:5555/simple/ django |
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
package main | |
import ( | |
"net" | |
) | |
type Chat struct { | |
clients []*Client | |
joins chan net.Conn | |
} |
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
user www-data; | |
worker_processes 4; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
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
package main | |
import ( | |
"bytes" | |
"crypto/tls" | |
"crypto/x509" | |
"encoding/json" | |
"fmt" | |
"io" | |
"io/ioutil" |
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
func QuotedSplit(input string) []string { | |
runedParts := [12][]rune{} | |
runedPartsEl := 0 | |
quoteActive := false | |
for _, r := range input { | |
if r == '"' && !quoteActive { | |
quoteActive = true | |
continue | |
} | |
if r == '"' && quoteActive { |
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 python | |
import requests | |
from requests.auth import HTTPBasicAuth | |
URL_TEMPLATE = ( | |
"https://api.bintray.com" | |
"/packages/{subject}/{repo}/{package}/files" | |
) |
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 python | |
# - gnupg: "keyring=/srv/packages/trusted.gpg state=present content='{{ lookup('file', 'userkeys/'+item+'.gpg') }}'" | |
# with_items: trusted_users | |
def get_key_id(module): | |
gnupg = module.get_bin_path('gpg', True) | |
armored_key = module.params['content'] | |
result = module.run_command([gnupg, "-"], data=armored_key, check_rc=True) | |
out = result[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
default: | |
mkdir -p main/binary-amd64 | |
dpkg-scanpackages -a amd64 pool/ /dev/null dists/trusty/ >main/binary-amd64/Packages | |
cat main/binary-amd64/Packages | gzip -c9 >main/binary-amd64/Packages.gz | |
cat main/binary-amd64/Packages | bzip2 -c9 >main/binary-amd64/Packages.bz2 | |
cat Release.in > Release | |
PACKAGES=main/binary-amd64/Packages /usr/local/bin/make-debian-release-file >> Release | |
rm -f Release.gpg |
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 random | |
import hashlib | |
_generated = set() | |
def rand_ip_part(): | |
return random.randint(0, 255) | |
OlderNewer