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 meh(): | |
value = True | |
name = "" | |
def __init__(self, name): | |
self.name = name | |
def __repr__(self): | |
if self.value: | |
return "1" | |
else: | |
return "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
#!/bin/sh | |
exec > /var/log/cloudflare.log 2>&1 | |
set -x | |
for ip in $(curl -s https://www.cloudflare.com/ips-v4); do /usr/sbin/iptables -I INPUT -p tcp -m multiport --dports http,https -s "$ip" -j ACCEPT; done | |
for ip in $(curl -s https://www.cloudflare.com/ips-v6); do /usr/sbin/ip6tables -I INPUT -p tcp -m multiport --dports http,https -s "$ip" -j ACCEPT; 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/sh | |
[Unit] | |
Description=Control gatling webserver | |
After=network.target | |
Requires=revprox.service | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/gatling -p 81 -L -F -S -D -c /var/www/ |
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" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
"time" | |
) |
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 | |
[Unit] | |
Description=Control go reverse Proxy | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/revprox | |
ExecReload=/bin/kill $MAINPID && /usr/bin/revprox |
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 | |
[Unit] | |
Description=Control gatling ssl webserver | |
After=network.target | |
[Service] | |
Type=simple | |
WorkingDirectory=/var/www | |
ExecStart=/opt/diet/bin/tlsgatling -F -S -D |
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
diff --git a/src/util.c b/src/util.c | |
index 3045bdf..bf0dad6 100644 | |
--- a/src/util.c | |
+++ b/src/util.c | |
@@ -324,6 +324,7 @@ int is_binary(const void *buf, const size_t buf_len) { | |
} | |
} | |
suspicious_bytes++; | |
+ log_debug("found suspicious byte %#x at pos %i", buf_c[i], i); | |
/* Disk IO is so slow that it's worthwhile to do this calculation after every suspicious byte. */ |
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
# This script remove the local Offline Address Book files and sets the | |
# registry key to disable automatic download of the OAB | |
$OFS = "`r`n`r`n" | |
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null | |
try { | |
$username = [Microsoft.VisualBasic.Interaction]::InputBox("Input username", "User", "") | |
$User = New-Object System.Security.Principal.NTAccount($username) | |
$sid = $User.Translate([System.Security.Principal.SecurityIdentifier]).value | |
} catch { |
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 ubuntu:precise | |
# essentials | |
RUN apt-get update -q | |
RUN apt-get install -y python-software-properties curl build-essential | |
# ag specific | |
RUN add-apt-repository -y 'ppa:ubuntu-toolchain-r/test' | |
RUN add-apt-repository -y 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.6 main' | |
RUN curl http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add - |
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
diff --git a/_layouts/post.html b/_layouts/post.html | |
index e75c724..9f70c29 100644 | |
--- a/_layouts/post.html | |
+++ b/_layouts/post.html | |
@@ -23,5 +23,22 @@ layout: default | |
<div class="post-content" itemprop="articleBody"> | |
{{ content }} | |
</div> | |
+{% if page.comments %} | |
+ <div id="disqus_thread"></div> |
OlderNewer