Skip to content

Instantly share code, notes, and snippets.

Hugo Zhang HugoPresents

Block or report user

Report or block HugoPresents

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View com.chinadns.startup.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
HugoPresents / Paginator.php
Last active Aug 29, 2015
Phalcon simple pagination use bootstrap style
View Paginator.php
class Paginator
public $current;
public $total_pages;
public $next;
public $before;
public $items;
public $query = [];
HugoPresents / Dockerfile
Last active Aug 29, 2015
boot2docker nfs for OS X
View Dockerfile
FROM boot2docker/boot2docker:latest
MAINTAINER Tuzki Zhang <>
RUN rm $ROOTFS/etc/rc.d/automount-shares && \
sed -i "s/\/etc\/rc.d\/automount-shares//g" $ROOTFS/opt/ && \
echo "#!/bin/sh\n\
/usr/local/etc/init.d/nfs-client start" >> $ROOTFS/opt/
RUN mkdir $ROOTFS/Users && \
echo " /Users nfs defaults 0 0" >> $ROOTFS/etc/fstab
HugoPresents / picture.go
Last active Jun 26, 2018
get & save picture size, width and height
View picture.go
package main
import (
_ ""
_ "image/gif"
HugoPresents / set_cookiejar.go
Created Dec 29, 2014
golang set cookieJar example
View set_cookiejar.go
package main
import (
HugoPresents /
Created Dec 26, 2014
Virtualbox IO Performance

~ is local, ~/htdocs mounted by vboxsf, /var/htdocs mounted by nfs.



root@Ubuntu:~# time dd bs=8k count=300000 if=test of=/dev/zero
300000+0 records in
300000+0 records out
2457600000 bytes (2.5 GB) copied, 3.9852 s, 617 MB/s

real	0m3.990s


CPU: E3-1230 V3 散片 ¥1349

显卡: 技嘉 GV-N760OC-2GD ¥1699

主板: 技嘉 GA-B85M-DS3H ¥379

内存: 金士顿骇客神条 8G DDR3 ¥445

View _ide_helper.php
* An helper file for Laravel 4, to provide autocomplete information to your IDE
* Generated for Laravel 4.2.8 on 2014-08-26.
* @author Barry vd. Heuvel <>
* @see
namespace {
HugoPresents /
Last active Aug 29, 2015
install & configure php5 nginx on ubuntu
# install depends
apt-get update && apt-get install -y aria2 libxml2 libxml2-dev libssl-dev pkg-config curl libcurl4-nss-dev enchant libenchant-dev libjpeg8 libjpeg8-dev libpng12-0 libpng12-dev libvpx1 libvpx-dev libfreetype6 libfreetype6-dev libt1-5 libt1-dev libgmp10 libgmp-dev libicu-dev mcrypt libmcrypt4 libmcrypt-dev libpspell-dev libedit2 libedit-dev libsnmp-dev libxslt1.1 libxslt1-dev autoconf make g++ python-software-properties git redis-server
# download php & install
tar -xf phpMyAdmin-4.2.2-all-languages.tar.gz
mkdir /var/htdocs
mv phpMyAdmin-4.2.2-all-languages /var/htdocs/pma
You can’t perform that action at this time.