Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# ================================================
# Description: Ubuntu upgrade install logs
# Last Modified: Sun Mar 09, 2014 08:32PM
# Author: Allex Wang (allex.wxn@gmail.com)
# ================================================
# check root
if [ "x$EUID" = "x" ] ; then
ubuntu13.04安装搜狗输入法
========================
## 安装fcitx之前先卸载ibus
sudo apt-get purge ibus ibus-gtk ibus-gtk3
sudo apt-get purge ibus-pinyin ibus-table python-ibus
killall ibus-daemon
rm -rf ~/.config/ibus
#! /bin/sh
#
# Created by configure
'./configure' \
'--prefix=/usr/local/php5' \
'--mandir=/usr/local/php5/man' \
# '--with-apxs2=/usr/local/apache2/bin/apxs' \
'--enable-cli' \
'--with-config-file-path=/usr/local/php5/etc' \
#!/bin/sh
# This script run at 00:00
# 00 00 * * * /bin/bash /opt/soft/nginx/script/cutlog.sh
# 00 00 * * * /usr/sbin/tmpwatch -m 72 /data/soft/nginx/logs/
# @author Allex Wang (http://iallex.com)
# <https://gist.github.com/allex/10360845>
# Set variable
<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
$VERSION = "0.3";
/* Lighttpd Enhanced Directory Listing Script
* ------------------------------------------
* Author: Evan Fosmark
* Version: 2008.08.07
*
@allex
allex / index.html
Created April 17, 2014 07:08
My nginx default page
<!DOCTYPE html>
<html>
<head>
<title>Welcome to Allex's nginx!</title>
<style>
body{width:35em;margin:0 auto;font-family:Tahoma,Verdana,Arial,sans-serif;}
</style>
</head>
<body>
<h1>Welcome to Allex's nginx!</h1>
@allex
allex / gist:11203573
Last active June 3, 2024 13:32
Ubuntu 安装中文字体

环境 (Environment)

版本:Ubuntu 14.04 LTS 默认语言:English(United States)

安装 (Setup)

Debian 和 Ubuntu 下对中文支持比较好的字体有: fonts-droid、ttf-wqy-zenhei 和 ttf-wqy-microhei 等,除了文泉驿系列字体外,比较流行的免费中文字体还有文鼎提供的楷体和上海宋,包名分别是: fonts-arphic-ukai 和 fonts-arphic-uming。

#!/bin/sh
# https://raw.githubusercontent.com/beautifulcode/ssh-copy-id-for-OSX/master/ssh-copy-id.sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
ID_FILE="${HOME}/.ssh/id_rsa.pub"
#!/bin/sh
# Copyright (C) 2010-2013 Alibaba Group Holding Limited
ngx_soext='.so'
CC=cc
CFLAGS=' -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -DNDK_SET_VAR -fPIC'
CPP='cc -E'
LINK='$(CC) -rdynamic -fPIC -shared '
#!/bin/bash
# add trust to which user?
user=$1
# user home
home=$(grep -E "^${user}:" /etc/passwd|cut -d: -f6)
# base dir
base=$2
cd $base