Skip to content

Instantly share code, notes, and snippets.

检查以下文件夹删除不需要的即可以

  • ~/Library/Logs/ (我全删了,没影响)
  • ~/Library/Caches/xxxxx(使用 DaisyDisk 找到容量比较大的删除. 不会对系统有影响)
  • ~/Library/Caches/com.spotify.client(全删, 正常工作)
  • ~/Library/Caches/Google/chrome (全删, 正常工作)
  • /Applications/Google Chrome/Contents/Versions/ (只保留最新的那个文件夹, 其他的删除, 正常工作)
  • ~/Library/Developer/Xcode/DerivedData/ (全删, 正常工作.)

工具:

  • DaisyDisk 使用试用版即可,可直观查看文件(夹)大小.
@bindiry
bindiry / _urls.md
Last active August 29, 2015 14:23
install ROR on Ubuntu 15.04
@evtuhovich
evtuhovich / .irbrc
Created March 22, 2011 11:33
My Irbrc file
require 'rubygems'
# Rails on-screen logging
def change_log(stream)
ActiveRecord::Base.logger = Logger.new(stream)
ActiveRecord::Base.clear_active_connections!
end
def show_log
@ZhangHanDong
ZhangHanDong / gist:1033906
Created June 19, 2011 07:52
MongoId Counter Cahce
#
# lib/mongoid/counter_cache.rb
# ruby
#
# Created by Zhang Alex on 2011-06-17.
# Copyright 2011 __ZhangHanDong__. All rights reserved.
#
# ===================================
# class Forum
# references_many :topics
@AndorChen
AndorChen / README.markdown
Created November 17, 2011 08:29
Howto Depoly Rails App to VPS

#如何将 Rails 应用程序部署到 VPS 上

如果已经在 VPS 上假设好了 Rails 生产环境,接下来就可以将部署应用程序了。

###需要用到的工具


@aoxu
aoxu / apnp_add.txt
Last active December 11, 2015 08:09
此文件用于添加东哥@cosbeta APNP中的域名白名单,可以直接复制粘贴。原理是比较东哥的白名单与地下铁路的白名单,将地下铁路多出来的部分提取出来。
265.com,2mdn.net,adnxs.com,adroll.com,adsonar.com,adtechus.com,aipai.com,atdmt.com,betrad.com,bluekai.com,cctv*.com,china.com,compete.com,douban.fm,etao.com,fantong.com,fastcdn.com,gamesville.com,google-analytics.com,harrenmedianetwork.com,homeinns.com,img.cctvpic.com,invitemedia.com,ipinyou.com,irs01.com,irs01.net,jing.fm,jysq.net,ku6cdn.com,kuaidi100.com ,legolas-media.com,live.com,lxdns.com,lycos.com ,lygo.com ,mangocity.com,mathtag.com,mediaplex.com,mediav.com,mlt01.com,mookie1.com,mosso.com,pixlr.com ,ptlogin2.qq.com,pubmatic.com,qstatic.com,quantserve.com,scanscout.com,scorecardresearch.com ,serving-sys.com ,sina.com,sinahk.net,sinajs.com ,snyu.com,staticsdo.com,sttlbb.com,tremormedia.com,tudouui.com,vizu.com,wrating.com ,xiu.com,yieldmanager.com,youshang.com,
@dlutcat
dlutcat / linux_tips.sh
Last active December 12, 2015 07:48
LinuxTips历史发布归档
######
# 本归档每周末收录当周的Tips
######
# 以root身份执行上一条命令
$ sudo!!
# 返回用户主目录
$ cd

https://github.com/imcj/get-mirror

get-mirror

通过查询当前设备的IP地址,获得在物理位置上比较接近的镜像服务。

vagrant@vagrant:~$ echo $(get-mirror ubuntu)
cn.archive.ubuntu.com
Q: abandon
A: 【考法 1】 n. 放纵: carefree, freedom from constraint
A: 【考法 2】 v. 放纵: to give (oneself) over unrestrainedly
A: 【考法 3】 v. 放弃: to withdraw from often in the face of danger or encroachment
A: 【考法 4】 v. 停止做某事: to put an end to (something planned or previously agreed to)
Q: awning
A: 【考法 1】 n. 雨篷,遮阳篷: a piece of material attached to a caravan or building which provides shelter from the rain or sun
Q: mercenary
#!/usr/bin/tclsh8.5
#
# Usage: git-unmerged branch1 branch2
#
# Shows all the non-common commits in the two branches, where non-common
# commits means simply commits with a unique commit *message*.
proc getlog branch {
lrange [split [exec git log $branch --oneline] "\n"] 0 400
}