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 | |
# | |
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN server | |
# on a Ubuntu or Debian instance. Tested with Ubuntu 14.04 & 12.04 and Debian 8 & 7. | |
# With minor modifications, this script *can also be used* on dedicated servers | |
# or any KVM- or XEN-based Virtual Private Server (VPS) from other providers. | |
# | |
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN | |
# YOUR AMAZON EC2 INSTANCE STARTS! | |
# |
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
server { | |
listen 80; | |
server_name fin.local; | |
root /usr/dev/finance; | |
index index.html; | |
} | |
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
пометить удаленные как локальные: | |
for b in `git branch -a | grep -Po '(?<=remotes/origin/).*'`; do git checkout $b; done | |
удалить удаленные по шаблону: | |
for b in `git ls-remote origin | grep -Po 'origin.*'`; do git push origin :$b; done | |
удалить локальные по шаблону: | |
for b in `git branch -a | grep -Po 'origin2.*'`; do git branch -D $b; 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
#!/usr/bin/env python | |
#coding: utf-8 | |
import settings | |
import subprocess | |
def get_email_logger(addrs, subject, email_settings): | |
''' Returns logger that send email ''' |
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
export WORKON_HOME=~/.envs | |
source /usr/local/bin/virtualenvwrapper.sh | |
export CFLAGS=-Qunused-arguments | |
export CPPFLAGS=-Qunused-arguments | |
export GOPATH=$HOME/dev/golang | |
export PATH=$PATH:$GOPATH/bin | |
source /usr/local/git/contrib/completion/git-completion.bash | |
source /usr/local/git/contrib/completion/git-prompt.sh |
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
{ | |
"custom_folder_icons": true, | |
"detect_indentation": false, | |
"draw_centered": false, | |
"font_face": "Consolas", | |
"font_size": 10, | |
"hide_snippets_on_completion": true, | |
"ignored_packages": | |
[ | |
"Clojure", |
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
sudo apt-get update | |
sudo apt-get install memcached python-dev python-pip sqlite3 libcairo2 \ | |
libcairo2-dev python-cairo pkg-config | |
sudo pip install -U pip | |
sudo pip install uwsgi | |
sudo adduser graphite | |
sudo su graphite | |
cd ~ |
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
#!/usr/bin/env python | |
#coding: utf-8 | |
from optparse import OptionParser | |
from datetime import date, datetime | |
import unidecode | |
import subprocess | |
import fcntl | |
import os |
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
$ wget http://tengine.taobao.org/download/tengine-1.3.0.tar.gz | |
$ wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.0.1.tar.gz | |
$ wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz | |
$ tar zxvf libunwind-1.0.1.tar.gz && cd libunwind-1.0.1 | |
$ CFLAGS=-fPIC ./configure | |
$ make CFLAGS=-fPIC | |
$ sudo make CFLAGS=-fPIC install | |
$ cd .. |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |