Skip to content

Instantly share code, notes, and snippets.

View wujunchuan's full-sized avatar
:octocat:
Focusing

John Trump wujunchuan

:octocat:
Focusing
View GitHub Profile
@lotem
lotem / squirrel.custom.yaml
Last active June 27, 2024 10:55
【鼠鬚管】定製檔
# 適用於【鼠鬚管】0.9.13+
# 位置:~/Library/Rime/squirrel.custom.yaml
# 用法:想要哪項生效,就刪去該行行首的#字符,但注意保留用於縮進的空格
patch:
# us_keyboard_layout: true # 鍵盤選項:應用美式鍵盤佈局
# show_notifications_when: growl_is_running # 狀態通知,默認裝有Growl時顯示,也可設爲全開(always)全關(never)
# style/horizontal: true # 候選窗横向顯示
# style/inline_preedit: false # 非內嵌編碼行
# style/font_face: "儷黑 Pro" # 我喜歡的字體名稱
@iambibhas
iambibhas / scopes.txt
Last active June 16, 2024 20:45
Sublime Text 2: Snippet scopes
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
@cobyism
cobyism / gh-pages-deploy.md
Last active July 18, 2024 05:22
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
#
# Mar 2013 Yad Smood
# VCS
YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} "
YS_VCS_PROMPT_PREFIX2=":%{$fg[cyan]%}"
@simplelife7
simplelife7 / array_diff.js
Created September 2, 2013 17:08
【JS】用Javascript计算数组差集算法
function array_diff(array1, array2) {
var o = {};//转成hash可以减少运算量,数据量越大,优势越明显。
for(var i = 0, len = array2.length; i < len; i++) {
o[array2[i]] = true;
}
var result = [];
for(i = 0, len = array1.length; i < len; i++) {
var v = array1[i];
if(o[v]) continue;
@VincentSit
VincentSit / update_gfwlist.sh
Last active March 24, 2024 14:39
Automatically update the PAC for ShadowsocksX. Only tested on OS X. (Deprecated)
#!/bin/bash
# update_gfwlist.sh
# Author : VincentSit
# Copyright (c) http://xuexuefeng.com
#
# Example usage
#
# ./whatever-you-name-this.sh
#
# Task Scheduling (Optional)
@elsonwx
elsonwx / machotkeyinwindows
Created March 9, 2019 03:20
autohotkey映射windows快捷键为mac方式
; !代表alt +代表shit键
!q:: Send !{f4}
!w:: Send ^w
!c:: Send ^c
!v:: Send ^v
!x:: Send ^x
!z:: Send ^z
!l:: Send ^l
!f:: Send ^f
!t:: Send ^t
@hayyp
hayyp / gitreader.sh
Last active October 30, 2020 13:55
Read git commits
#!/usr/bin/env bash
# Consider creating a soft link for the script under /usr/local/bin
# ln -s ~/path/to/script /usr/local/bin/gitreader
# And perhaps give it a better name
if [[ -z $1 || $1 == "help" ]]
then
echo "
gitreader first to checkout the first commit
@Myndex
Myndex / OrangeYouGladIHaveNoLife.md
Last active June 19, 2024 13:59
Orange You Wondering About Contrast? Part I of three on the APCA and why contrast is important. Especially orange contrast.

Orange You Wondering About Contrast?

What is contrast anyway? In this context, we are talking about the contrast of text on a background, and more directly, how well you can read that text. While this may seem simple in concept, the reality is not only challenging but increasingly important. The internet destroyed the printing industry nearly overnight. Where there were once magaine and newsstands, there are now empty spaces. And reading in general had dropped 40% in the last two decades.

And the internet is hard to read. Too hard, and it shouldn't be. There are some old existing standards on contrast and readability, some dating back to the last century, that are part of the problem. When WCAG 2 was being worked on nearly two decades ago, computers used bulky CRT monitors, and the iPhone was still on the drawing board.

Back then, cell phones were nothing but a phone, websites were only on your desktop/laptop, and those sites invariably used the same core websafe fonts & basic HTML colors. Served over