This file contains hidden or 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 | |
source $PWD/.sync_settings | |
if [[ -z "$SYNC_HOST" ]]; then | |
echo "Please specify SYNC_HOST in .sync_settings" | |
exit 1 | |
fi | |
if [[ -z "$SYNC_HOST" ]]; then |
This file contains hidden or 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/srclib/stdio.in.h b/srclib/stdio.in.h.new | |
index 473c84c..499b073 100644 | |
--- a/srclib/stdio.in.h | |
+++ b/srclib/stdio.in.h | |
@@ -695,7 +695,9 @@ _GL_CXXALIASWARN (gets); | |
/* It is very rare that the developer ever has full control of stdin, | |
so any use of gets warrants an unconditional warning. Assume it is | |
always declared, since it is required by C89. */ | |
+ #if HAVE_RAW_DECL_GETS | |
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); |
This file contains hidden or 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
--- src/Makefile.am 2016-01-24 16:48:49.067408827 +0100 | |
+++ src/Makefile.am.new 2016-01-24 16:48:59.294290424 +0100 | |
@@ -1,7 +1,7 @@ | |
bin_PROGRAMS = ocat | |
ocat_SOURCES = ocat.c ocatlog.c ocatroute.c ocatthread.c ocattun.c ocatv6conv.c ocatcompat.c ocatpeer.c ocatsetup.c ocatipv4route.c ocateth.c ocatsocks.c ocatlibe.c ocatctrl.c ocatipv6route.c ocaticmp.c ocat_wintuntap.c ocat_netdesc.c ocathosts.c ocatresolv.c | |
noinst_HEADERS = ocat.h ocat_netdesc.h strlcpy.c strlcat.c ocathosts.h | |
-AM_CFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" | |
+AM_CFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" -D_PATH_HOSTS=/etc/hosts | |
install-exec-hook: |
This file contains hidden or 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
24171:20151208:102013.946 Error while sending data to the server [ZBX_TCP_WRITE() failed: [110] Operation timed out] | |
24171:20151208:102013.946 sending data to server failed: (null) | |
... | |
24169:20151208:102225.487 received configuration data from server, datalen |
This file contains hidden or 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 | |
function filter_recursive($data, $predicate = null) | |
{ | |
if ($predicate == null) { | |
$predicate = function ($value) { return !empty($value); }; | |
} | |
$is_object = false; | |
if (is_object($data)) { |
This file contains hidden or 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 | |
while true; | |
do | |
sleep 0.005 | |
ST=$(git -c color.ui=always status -sb); | |
tput reset; | |
echo -e "$ST"; |
This file contains hidden or 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 | |
file=$1 | |
# Ignore the command this script was run with to prevent infiniute recursion | |
editor=$(which -a $EDITOR | grep -v $0 | head -n1) | |
if test -z "$CURRENT_UID"; then | |
export CURRENT_UID=$UID | |
fi |
This file contains hidden or 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 | |
while : | |
do | |
clear | |
git status -sb | |
inotifywait -qr -e modify -e create -e move -e delete . 2>&1 > /dev/null | |
sleep 0.3 | |
done |
This file contains hidden or 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
sudo docker build -t $name . | |
if [[ $? -gt 0 ]] | |
then | |
exit $? | |
fi | |
echo -n "Image built, recreate container? [Yn] " | |
read answer |
This file contains hidden or 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 Data.List | |
histogram :: [Int] -> String | |
histogram xs = | |
let c = countNumbers xs | |
h = foldr max 0 c | |
l = "==========" | |
n = "0123456789" | |
g = unlines $ reverse $ transpose $ numbersToStars h c |