Skip to content

Instantly share code, notes, and snippets.

View Alir3z4's full-sized avatar
💭
Rock'nRolla

Alireza Savand Alir3z4

💭
Rock'nRolla
View GitHub Profile
#
# Definitions of ISO 4217 Currencies
# Source: http://www.iso.org/iso/support/faqs/faqs_widely_used_standards/widely_used_standards_other/currency_codes/currency_codes_list-1.htm
#
CURRENCY['BZD'] = Currency(code='BZD', numeric='084', name='Belize Dollar', countries=['BELIZE'])
CURRENCY['YER'] = Currency(code='YER', numeric='886', name='Yemeni Rial', countries=['YEMEN'])
CURRENCY['XBA'] = Currency(code='XBA', numeric='955', name='Bond Markets Units European Composite Unit (EURCO)', countries=[])
CURRENCY['SLL'] = Currency(code='SLL', numeric='694', name='Leone', countries=['SIERRA LEONE'])
CURRENCY['ERN'] = Currency(code='ERN', numeric='232', name='Nakfa', countries=['ERITREA'])
#!/usr/bin/env python
import sys
base_path = sys.argv.pop()
sys.path.insert(0, base_path)
from fix_getpass import fixGetpass
import os
from django.core.management import execute_manager
# Fucking hack to set local env for django debug
# yeah
" -[ General behaviour ]-
" general
set nocompatible
set nowrap
syntax on
filetype plugin indent on
" search
set nohls
set incsearch
for f in *.*; do echo "video file $f is under fucking processing"; ffmpeg -i $f $f.mkv"; done
*filter
# Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT -i lo -d 127.0.0.0/8 -j REJECT
# Accept all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allow all outbound traffic - you can modify this to only allow certain traffic
sudo ip link set wlan0 down
sudo iwconfig wlan0 channel auto
sudo ip link set wlan0 up
sudo rm /var/run/wpa_supplicant/wlan0
sudo rm -rf /run/dhcpcd-wlan0.pid
sudo wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
#sleep 20
sudo dhcpcd wlan0
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
print 'Upgrading %s' % dist.project_name
call("pip2 install --upgrade " + dist.project_name, shell=True)
# Note
# mounting vmail
mount.s3ql --allow-other s3://archi-vmail /home/vmail/
# Chown to vmail:vmail
chown -R vmail:vmail /home/vmail/
# bring the ubuntu up ;)
passwd
adduser alireza
@Alir3z4
Alir3z4 / backup-archi,sh
Created November 7, 2012 12:36
dummy bk file
#!/bin/bash
# Author Alireza Savand
# CopyRight 2012 Alireza Savand
# Back up
echo "==========================================="
echo "Start to get /home/vmail dir backup"
echo "==========================================="
echo ""
echo "Compressing format gzip2"
# server {
# listen 80;
# server_name exampl.io www.exampl.io;
# access_log /srv/http/exampl.io/orgia/logs/access.log;
# error_log /srv/http/exampl.io/orgia/logs/error.log;
#
# #ssl on;
# #ssl_session_timeout 5m;
# #ssl_certificate /etc/ssl/certs/www.exampl.io.crt;
# #ssl_certificate_key /etc/ssl/private/www.exampl.io.key;