Skip to content

Instantly share code, notes, and snippets.

@fallingfree
fallingfree / utility.txt
Created November 12, 2012 09:18 — forked from node/linux tips & hacks
常用命令与工具集
- 下载整站
> wget -r -p -np -k http://xxoo.com
注释: -r 递归, -p 下载网页关联的其他资源,-np 不搜索上层目录, -k 绝对链接转为相对链接
其他参数:
  ◆-b:后台下载,Wget默认的是把文件下载到当前目录。
  ◆-O:将文件下载到指定的目录中。
  ◆-P:保存文件之前先创建指定名称的目录。
  ◆-t:尝试连接次数,当Wget无法与服务器建立连接时,尝试连接多少次。
  ◆-c:断点续传,如果下载中断,那么连接恢复时会从上次断点开始下载。
@fallingfree
fallingfree / gist:4201424
Created December 4, 2012 07:05 — forked from ocean90/gist:1544377
Compiling Compass.app on Mac OS X
Tutorial for compiling the Compass.app (http://compass.handlino.com/)
=====================================================================
Java installed?
java -version
Load jRuby (for example JRuby 1.6.5.1 Binary .zip)
http://jruby.org/download
Unzip jRuby to `/usr/local/`
// 新增當地時區的時間物件
function DateTimezone(offset) {
// 建立現在時間的物件
d = new Date();
// 取得 UTC time
utc = d.getTime() + (d.getTimezoneOffset() * 60000);
// 新增不同時區的日期資料
@fallingfree
fallingfree / 0_reuse_code.js
Last active September 10, 2015 01:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@fallingfree
fallingfree / osx_install.sh
Created October 21, 2015 10:08 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"