Skip to content

Instantly share code, notes, and snippets.

@Bigcircle
Bigcircle / gist:2635181
Created May 8, 2012 13:49
itunes 添加歌词
--使用说明:
--1、打开iTunes,选择要添加歌词的歌曲,可以批量选择
--2、点击脚本上的“运行”即可,整理结束时iTunes会有提示
--3、虽然脚本支持批量整理,但是程序自动化整理永远不可能那么智能,不能保证歌曲歌词全部正确,可能需要您后期再次加工
--4、如果您的歌曲中含有繁体汉字,程序无法自动搜索歌词
tell application "iTunes"
if selection is not {} then
set k to count (item of selection)
else
@Bigcircle
Bigcircle / gist:2686138
Created May 13, 2012 05:53
centos搭ror环境
# 163源
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.save
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
mv CentOS6-Base-163.repo CentOS-Base.repo
# 更新yum并立即生效
yum check-update
yum update
yum makecache
@Bigcircle
Bigcircle / gist:2686391
Last active October 4, 2015 19:27
ubuntu/mac安装rvm
# debain类linux安装ruby
sudo apt-get install curl
sudo apt-get install git
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
type rvm | head -1 # 返回rvm是个函数安装成功
rvm notes # 查找依赖包
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
rvm list # 显示现在可安装的稳定版本
rvm install 1.8.7
@Bigcircle
Bigcircle / gist:2686427
Created May 13, 2012 06:09
常用启动命令&svn&node.js
# redis开机自启动
cp /usr/local/Cellar/redis/2.4.8/homebrew.mxcl.redis.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
# 启动redmine
ruby script/server webrick -e production
# Finder 显示隐藏文件
defaults write com.apple.finder AppleShowAllFiles -bool true
# 隐藏文件
@Bigcircle
Bigcircle / gist:2686453
Created May 13, 2012 06:21
*nix下常用命令
# 在线时间统计 / 时间/ 日历
ac / date /cal
# 查看进程
ps aux|grep mysql
# 关机/重启 shutdown -r重启 -h关机后关闭电源(halt), reboot
# 显示挂载的空间列表
df -h
# 以文件大小排列来显示文件和目录
ls -lSr |more
# 估计dir1目录使用的磁盘空间
@Bigcircle
Bigcircle / gist:2698632
Created May 15, 2012 02:26
安装postfix log分析工具 pflogsumm
1 下载
postfix 地址 http://www.postfix.org/addon.html
pflogsumm下载地址 http://jimsun.linxnet.com/postfix_contrib.html
2 安装 Date::Calc
#perl -MCPAN -e shell
cpan> install Date::Calc
3 安装 pflogsumm
tar zxvf pflogsumm-1.1.0.tar.gz
@Bigcircle
Bigcircle / gist:2814261
Created May 27, 2012 13:44
some musics
kelly mack - One Last Time (chelsea 欧冠决赛)
@Bigcircle
Bigcircle / gist:3098779
Created July 12, 2012 15:15
win7 cygwin
# win7 下安装cygwin
http://cygwin.com/install.html 下载 setup.exe
*选择要安装的目录及下载包存放位置
*安装包时选择安装 gcc wget vim make curl gcc++ 等下载,编译必须的包(很重要)
*over
@Bigcircle
Bigcircle / gist:3115666
Created July 15, 2012 07:18
railscast download
http://media.railscasts.com/assets/episodes/videos/001-caching-with-instance-variables.mp4
http://media.railscasts.com/assets/episodes/videos/002-dynamic-find-by-methods.mp4
http://media.railscasts.com/assets/episodes/videos/003-find-through-association.mp4
http://media.railscasts.com/assets/episodes/videos/004-move-find-into-model.mp4
http://media.railscasts.com/assets/episodes/videos/005-using-with-scope.mp4
http://media.railscasts.com/assets/episodes/videos/006-shortcut-blocks-with-symbol-to-proc.mp4
http://media.railscasts.com/assets/episodes/videos/007-all-about-layouts.mp4
http://media.railscasts.com/assets/episodes/videos/008-layouts-and-content-for.mp4
http://media.railscasts.com/assets/episodes/videos/009-filtering-sensitive-logs.mp4
http://media.railscasts.com/assets/episodes/videos/010-refactoring-user-name-part-1.mp4
199.91.73.222
178.79.131.110
http://dns.v2ex.co
168.95.1.1 mac store dns