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 MySQLdb | |
db = MySQLdb.connect("localhost", "dbuser", "dbpass", "dbname") | |
cursor = db.cursor() | |
print "Insert mailman domain and aliases to iRedmail database." | |
sql = """ | |
select * from domain where domain="lists.example.com" |
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 | |
# Arch Linux | |
# clone desktop | |
xrandr --auto | |
# extend desktop | |
xrandr --output LVDS-1-0 --auto --output VGA-1-0 --auto --right-of LVDS-1-0 |
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
set nocompatible " required | |
filetype off " required | |
filetype plugin indent on " required | |
" Control split | |
set splitbelow | |
set splitright | |
" Split navigations |
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 | |
# using imagemagick package | |
# convert *.png file to *.jpg file | |
convert file.png file.jpg | |
# convert *.jpg file to *.pdf file | |
convert file.jpg file.pdf | |
# using ghostscript package |
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 domain.com; | |
root /usr/share/nginx/html; | |
try_files $uri =404; | |
index index.php index.html; | |
location / { | |
} |
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 | |
sudo pacman -S --needed $(pacman -Ss font | awk -F" " '{print $1}' | grep "/" | awk -F"/" '{print $(NF)}' | grep -v mate | grep -v tex | tr '\n' ' ') |
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 | |
# | |
# nginx - this script starts and stops the nginx daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /etc/nginx/nginx.conf | |
# config: /etc/sysconfig/nginx |
NewerOlder