Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
BUCKETNAME="your_s3_bucket"
LOGDIR="/var/log/nginx"
LOGDATE=$(date +"%Y%m%d")
HOST=$(wget -q -O- http://169.254.169.254/latest/meta-data/instance-id)
LOGFILES=("access")
echo "Moving access logs to dated logs.."
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="<%= swfObjectPath_useGoogle == true ? 'http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js' : swfObjectPath %>"></script>
<script type="text/javascript">
swfobject.registerObject("<%= contentID %>", "<%= fpVersionMajor %>.<%= fpVersionMinor %>.<%= fpVersionRelease %>");
</script>
</head>
#!/bin/bash
if ! VBoxManage showvminfo $(VBoxManage list vms|grep dvm|awk '{print $1}'|tr -d '"')|grep -q running
then
VBoxManage startvm $(VBoxManage list vms|grep dvm|awk '{print $1}'|tr -d '"') --type headless
ssh docker@localhost -p 2222 -i ~/.vagrant.d/insecure_private_key "sudo ifconfig eth1 10.1.2.3"
fi
# run VBoxManage modifyvm $(VBoxManage list vms|grep dvm|awk '{print $1}'|tr -d '"') --natpf1 "docker,tcp,127.0.0.1,4243,,4243" once for below
export DOCKER_HOST=tcp://127.0.0.1:4243
/usr/local/bin/docker $*
diff -Naur newsbeuter-2.8/Makefile newsbeuter-2.8-m/Makefile
--- newsbeuter-2.8/Makefile 2014-01-19 07:10:41.000000000 +0800
+++ newsbeuter-2.8-m/Makefile 2014-02-02 12:43:11.000000000 +0800
@@ -11,7 +11,7 @@
# compiler and linker flags
DEFINES=-DLOCALEDIR=\"$(localedir)\"
WARNFLAGS=-Wall -Wextra
-CXXFLAGS+=-ggdb -Iinclude -Istfl -Ifilter -I. -Irss $(WARNFLAGS) $(DEFINES)
+CXXFLAGS+=-std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss $(WARNFLAGS) $(DEFINES)
LDFLAGS+=-L.
diff -Naur newsbeuter-2.8/Makefile newsbeuter-2.8-m/Makefile
--- newsbeuter-2.8/Makefile 2014-01-19 07:10:41.000000000 +0800
+++ newsbeuter-2.8-m/Makefile 2014-02-02 12:49:15.000000000 +0800
@@ -11,7 +11,7 @@
# compiler and linker flags
DEFINES=-DLOCALEDIR=\"$(localedir)\"
WARNFLAGS=-Wall -Wextra
-CXXFLAGS+=-ggdb -Iinclude -Istfl -Ifilter -I. -Irss $(WARNFLAGS) $(DEFINES)
+CXXFLAGS+=-std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss $(WARNFLAGS) $(DEFINES)
LDFLAGS+=-L.
# dvm configuration
# -----------------
#
# **Note**: All commented out settings are default values
#
# Docker guest IP address, available on a private network
#
export DOCKER_IP="10.1.2.3"
ssh-dss AAAAB3NzaC1kc3MAAACBAIX84vSPAx/eVprxDbREnGN8wvfOHct+VeqCLuFdRPZ8id+Ls/pmklAeZrrOVJQGPyVM8h8rXzyfCq3yl5oSBaYarePKc1Zut1VGOCEFsdIJ+UC02zSibzZMvmYP5Ub7zjapdHxmtqoJrp8hg8PLdrfUjc7/s17FAJcTEBEVWBERAAAAFQC5WyL/NnpyCIoU1nnlkUSQctz+sQAAAIAkc3ND3riLIXxMmpit5Z7snIw6qp+ZZ22z7+Urd+qEGGki1RlQNBz7pNLhRNNsFXN90s8qHI7nZSaXq72zTZDFUPW2N+f4u8+Uc2uzBLZsRuis4piG7nIKRNxgxtoG5qQHVeG2pyrbIBPIJ2qLrdOqGhlbDnIzX18wrAoYslK63gAAAIB57F0D16nX3Xkl2Wp+F/57Fb0BtERPaNPZShtlBa5s/fLoU6dZlpGgU/PIvePLjwjskfqQab/ziTSk9hGQPB0ox/oJhV1GuEsv2SD4p385cOiRhYD3V/M9w9FqHfu6NwqbGVMhBKMYLY9HgbrdLxDiGoRDYs47QrsUmZq1OhNUGA== neerav@viki.com
Index: b/ext/readline/readline.c
===================================================================
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -1883,7 +1883,7 @@
rl_attempted_completion_function = readline_attempted_completion_function;
#if defined(HAVE_RL_PRE_INPUT_HOOK)
- rl_pre_input_hook = (Function *)readline_pre_input_hook;
+ rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
@neeravkumar
neeravkumar / 0_reuse_code.js
Created June 4, 2014 02:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!DOCTYPE html>
<html>
<head>
<title>Docker and Go</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
@import url(http://fonts.googleapis.com/css?family=Neuton);
@import url(http://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
@import url(http://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);