В репозитории содержится программный код, ресурсные файлы, сопутствующая документация и другие файлы, необходимые для разработки/сборки/тестирования приложения.
Основные секции:
Put these in /etc/sysctl.conf then run sysctl -p to apply them. | |
# General gigabit tuning: | |
net.core.rmem_max = 16777216 | |
net.core.wmem_max = 16777216 | |
net.ipv4.tcp_rmem = 4096 87380 16777216 | |
net.ipv4.tcp_wmem = 4096 65536 16777216 | |
net.ipv4.tcp_syncookies = 1 | |
# this gives the kernel more memory for tcp |
// Calculates the checksum for a sentence | |
// Calculates the checksum for a sentence | |
static string getChecksum(string sentence) { | |
//Start with first Item | |
int checksum= Convert.ToByte(sentence[sentence.IndexOf('$')+1]); | |
// Loop through all chars to get a checksum | |
for (int i=sentence.IndexOf('$')+2 ; i<sentence.IndexOf('*') ; i++){ | |
// No. XOR the checksum with this character's value | |
checksum^=Convert.ToByte(sentence[i]); |
# | |
# generic .gitignore | |
# | |
## no hiddens in scm | |
.* | |
## editor backups | |
*~ | |
*.bak |
import jinja2 | |
import markdown | |
def safe_markdown(text): | |
return jinja2.Markup(markdown.markdown(text, ...)) | |
env = jinja2.Environment(...) | |
env.filters['markdown'] = safe_markdown | |
ipset -N tor iphash | |
wget -q https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$MY_IP -O - | sed '/^#/d' |while read IP | |
do | |
ipset -q -A tor $IP | |
done | |
iptables -A INPUT -m set --match-set tor src -j DROP |
(def translit-table-ru-en | |
(apply array-map [\a "a" | |
\b "b" | |
\c "c" | |
\d "d" | |
\e "e" | |
\f "f" | |
\g "g" | |
\h "h" | |
\i "i" |
(defn grouped-dec [decimal-number] | |
;; NOTE: handle sign separately | |
(when decimal-number | |
(let [s (str decimal-number) | |
[deci fract] (str/split s #"\.") | |
grouped | |
(->> deci | |
(reverse) | |
(partition 3 3 nil) | |
(map #(apply str %)) |
import jinja2 | |
import scrubber # http://pypi.python.org/pypi/scrubber | |
def sanitize_html(text): | |
return jinja2.Markup(scrubber.Scrubber().scrub(text)) | |
jinja_env.filters['sanitize_html'] = sanitize_html | |
# | |
# maxp.dev: generic .gitignore | |
# | |
## no hiddens in scm | |
.* | |
## editor backups | |
*~ | |
*.bak |