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
# | |
# 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']) |
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 | |
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 |
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
" -[ General behaviour ]- | |
" general | |
set nocompatible | |
set nowrap | |
syntax on | |
filetype plugin indent on | |
" search | |
set nohls | |
set incsearch |
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 f in *.*; do echo "video file $f is under fucking processing"; ffmpeg -i $f $f.mkv"; 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
*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 |
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 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 |
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
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) |
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
# 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 |
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/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" |
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 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; |