Skip to content

Instantly share code, notes, and snippets.

View appleshan's full-sized avatar
💭
抛弃世俗之浮躁,留我钻研之刻苦.

Alec Shan appleshan

💭
抛弃世俗之浮躁,留我钻研之刻苦.
View GitHub Profile
@planbnet
planbnet / gnome-terminal-zenburn.sh
Created December 2, 2011 09:12
Zenburn color scheme for gnome-terminal
#!/usr/bin/env bash
dir=$(dirname $0)
gconfdir=/apps/gnome-terminal/profiles
echo # This makes the prompts easier to follow (as do other random echos below)
########################
### Select a profile ###
########################
@hrldcpr
hrldcpr / tree.md
Last active June 8, 2024 18:11
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@lotem
lotem / default.custom.yaml
Last active January 25, 2024 08:47
在Rime輸入方案選單中添加五筆、雙拼、粵拼、注音,保留你需要的
# default.custom.yaml
# save it to:
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
patch:
schema_list:
- schema: luna_pinyin # 朙月拼音
- schema: luna_pinyin_simp # 朙月拼音 简化字模式
@paulmillr
paulmillr / active.md
Last active June 24, 2024 13:58
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@syxc
syxc / 修复系统权限错误.txt
Created May 29, 2012 06:23
sudo chmod 777 / 惨剧修复简单步骤
sudo chmod 777 /
sudo chmod 777 -R /
Linux下以上命令的危害性,试过的人都会觉得可怕,有些人遇到这种情况,第一反应是没救了,其实,你要愿意花功夫去折腾,还是有办法滴!
下面理了下怎么折腾:
道具:
A、B两台电脑,假设都装着Ubuntu 12.04版本的系统,都能ssh、root(平时装Linux的时候这两个最好都弄好了,以备不时之需)。
情景:
现假设「A」是那台悲剧的执行过「sudo chmod 777 /」的电脑,什么效果,就不说了,反正不是什么好事,如果好奇,一试便知!
@zythum
zythum / gist:2848881
Created June 1, 2012 04:50
google收录的敏感词
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 29, 2024 08:12
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@gotnix
gotnix / rsync_app.sh
Created August 13, 2012 08:41
Sync app directory.
#!/bin/bash
#
# SCRIPT: rsync_app
# AUTHOR: terry zheng
# E-MAIL: jfhgmv@gmail.com
# DATE: Mon Aug 13 10:33:38 2012
# REV: 1.0.A (Valid are A, B, D, T and P)
# (for Alpha, Beta, Dev, Test and Production)
#
# PLATFORM: GNU/Linux (SPECIFY: AIX, FreeBSD, GNU/Linux, HP-UX, Solaris
@ngn999
ngn999 / gist:3761037
Created September 21, 2012 11:47
Emacs Abbrev

Abbrev是神马

Abbrev就是缩写的意思, 在Emacs里Abbrev能方便的输入这种缩写. 比如, 定义好, mgmtmanagement的缩写,
那以后你输入mgmt, 加一非字母数字符号, 就自动扩展成management. 很好用.

如何使用

定义:

@suziewong
suziewong / cookie_session.md
Created December 25, 2012 04:49
PHP中session与cookie的区别?