Skip to content

Instantly share code, notes, and snippets.

View verdana's full-sized avatar

Verdana Mu verdana

  • 12:29 (UTC +08:00)
View GitHub Profile
@verdana
verdana / custom_genesis.json
Last active December 27, 2017 06:54
Genesis block config example
{
"config": {
"chainId": 99,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0
},
"alloc": {},
@verdana
verdana / phpredis-build.sh
Last active June 25, 2016 14:41
Compile phpredis or xdebug
configure --disable-all --enable-cli --enable-session --enable-hash
--enable-redis=shared --enable-redis-session
--enable-yaf=shared
--disable-zts
<?php
/**
* php-ansi-color
*
* Original
* https://github.com/loopj/commonjs-ansi-color
*
* @code
* <?php
* require_once "ansi-color.php";
@verdana
verdana / cygwin-fstab
Last active December 29, 2015 07:49
Cygwin fstab
# For a description of the file format, see the Users Guide
# http://cygwin.com/cygwin-ug-net/using.html#mount-table
# This is default anyway:
none / cygdrive binary,noacl,posix=0,user 0 0
none /cygdrive cygdrive binary,noacl,posix=0,user 0 0
D:/Cygwin/bin /usr/bin ntfs binary,posix=0,noacl 0 0
D:/Cygwin/lib /usr/lib ntfs binary,posix=0,noacl 0 0
D:/Cygwin / ntfs binary,posix=0,noacl,override 0 0
@verdana
verdana / nginx-chroot.sh
Last active December 20, 2015 14:29
在 chroot 中安装 nginx
#!/bin/sh
[[ $EUID != 0 ]] && echo "Please run as root. Terminating..." && exit 1
export JAIL=/srv/http
## 删除所有文件
remove_all() {
umount -f $JAIL/run > /dev/null 2>&1
umount -f $JAIL/tmp > /dev/null 2>&1
[Unit]
Description=Nginx Web Server
[Service]
Type=forking
ExecStartPre=/usr/bin/chroot /srv/http /usr/bin/nginx -t -q
ExecStart=/usr/bin/chroot /srv/http /usr/bin/nginx
ExecReload=/usr/bin/chroot /srv/http /usr/bin/nginx -s reload
ExecStop=/usr/bin/chroot /srv/http /usr/bin/nginx -s quit
@verdana
verdana / install.sh
Last active December 14, 2022 09:15
Shell script to help with installing and configuring Arch linux
#!/bin/sh
# Updated: Wednesday Dec 14, 2022
# 必须以超级用户权限运行,似乎没啥必要...
[[ $EUID != 0 ]] && echo "Please run as root. Terminating..." && exit 1
# 显示系统时间
timedatectl status
echo ""