Skip to content

Instantly share code, notes, and snippets.

View abulte's full-sized avatar

Alexandre Bulté abulte

View GitHub Profile
@abulte
abulte / rethindb_ip_whitelist.sh
Created December 7, 2012 13:07
RethinkDB IP whitelist on service ports
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# set default policies to allow everything
# this should be DROP by default but out of scope...
iptables -P INPUT ACCEPT
@abulte
abulte / build_rethinkdb_wheezy.sh
Created December 7, 2012 12:58
Build RethinkDB on Debian Wheezy
# <http://www.rethinkdb.com/docs/build/>
sudo apt-get install g++ protobuf-compiler protobuf-c-compiler libprotobuf-dev \
libprotobuf-c0-dev libboost-dev libssl-dev libv8-dev libboost-program-options-dev \
libgoogle-perftools-dev jsdoc-toolkit libprotoc-dev curl exuberant-ctags m4 \
rubygems
# *carefully note all packages installed!!*
mkdir ~/tmp && cd ~/tmp
wget http://nodejs.org/dist/v0.8.15/node-v0.8.15.tar.gz
tar xvfz node-v0.8.15.tar.gz
@abulte
abulte / vhost.conf
Created November 26, 2012 11:51
nginx vhost php
server {
listen 80; ## you can put ip’s or localhost here. Or change the port.
server_name benchmark.maboiteprivee.fr;
server_name_in_redirect off;
access_log /var/log/nginx/benchmark.access.log;
error_log /var/log/nginx/benchmark.error.log;
index index.php index.html index.htm default.html default.htm;
root /var/www/benchmark;
@abulte
abulte / essentials.txt
Last active October 13, 2015 05:37
Debian essential packages
sudo
vim
fail2ban
git
build-essential
mosh
etckeeper
# LAMP
nginx
@abulte
abulte / install_pecl_intl.sh
Created November 21, 2012 09:37
Install intl pecl extension on MAMP Mac OS 10.8.2
# get pecl ready
# http://www.lullabot.com/articles/installing-php-pear-and-pecl-extensions-on-mamp-mac-os-x-107-lion
# if ! autoconf bin on your system
brew install autoconf
# install ICU
brew install icu4c
sudo pecl install intl
@abulte
abulte / .vimrc
Created November 20, 2012 11:14
My vimrc
syntax on
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
@abulte
abulte / backup_glacier.py
Created November 15, 2012 17:09
Simple AWS Glacier backup for files and MySQL DB
#!/usr/bin/env python
import sys
from datetime import datetime
import subprocess
DB_LOGIN = 'root'
DB_PASSWD = 'XXXX'
VAULT_NAME = 'backup_sunny'
HOSTNAME = 'Sunny'
@abulte
abulte / gist:4078770
Created November 15, 2012 14:02
Current date string python
from datetime import datetime
today = datetime.today()
date_string = '%s%s%s-%s%s%s' % (today.year, today.month, today.day, today.hour, today.minute, today.second)
@abulte
abulte / COPYING.txt
Created October 23, 2012 21:17
Build a custom Raspian image #2
# originally copied from http://michael.gorven.za.net/blog/2012/10/22/building-raspbian-images-raspberry-pi
# Copyright (C) 2012 Michael Gorven <http://michael.gorven.za.net/>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@abulte
abulte / .gitignore
Created October 20, 2012 20:58
Simple Arduino Serial reader script in python
We couldn’t find that file to show.