This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /Applications/TemperatureMonitor.app/Contents/MacOS/tempmonitor -a -l -f | | |
| while read reading; do | |
| set -- $reading; | |
| temperature="${@:$[$#-1]:1}"; | |
| sensor="${@:2:$[$#-3]}"; | |
| sensor="${sensor:0:$[${#sensor}-1]}"; | |
| sensor="${sensor//(}"; | |
| sensor="${sensor//)}"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ps xmo rss=,pmem=,comm= | while read rss pmem comm; ((n++<5)); do | |
| size="$[rss/1024]"; | |
| short=$[4-${#size}]; | |
| size="(${size}M)"; | |
| i=0; | |
| while ((i++ < short)); do size=" $size"; done; | |
| pmem="${pmem%%.*}" | |
| if (($pmem >= 20)); then color=$'\e[31m'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ps xro %cpu=,comm= | while read cpu comm; ((i++<5)); do | |
| int=$cpu | |
| int="${int%%.*}" | |
| if (($int >= 50)); then color=$'\e[31m'; | |
| elif (($int >= 25)); then color=$'\e[33m'; | |
| else color=$'\e[32m'; | |
| fi; | |
| echo "$color$cpu% $(basename "$comm")"$'\e[0m'""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Connects Jekyll with Lychee (http://lychee.electerious.com/) | |
| # | |
| # # Features | |
| # | |
| # * Generate album overview and link to image | |
| # * Caching of JSON data | |
| # | |
| # # Usage | |
| # | |
| # {% lychee_album <album_id> %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| redis = require 'redis' | |
| client = redis.createClient() | |
| SS_PREFIX = 'ss:' | |
| # | |
| # user | |
| # name: shadowsocks 的用户名 | |
| # password: shadowsocks 的密码 | |
| # method: shadowsocks 的加密方法 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Rime dictionary | |
| # encoding: utf-8 | |
| # | |
| # 中英文混输的时候有用 | |
| --- | |
| name: chinese_contain_english | |
| version: "0.1" | |
| sort: by_weight | |
| use_preset_vocabulary: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # luna_pinyin.custom.yaml | |
| # 修改字典名爲 luna_pinyin.kunki | |
| # 其對應的用戶詞典名取句點之前部分即 luna_pinyin | |
| patch: | |
| translator/dictionary: luna_pinyin.kunki |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form id="search-form"> | |
| <input id="query" type="text" placeholder="正则搜索"></input> | |
| <button type="submit"><i class="icon-search"></i></button> | |
| </form> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| var entries = null; | |
| function htmlEscape(s) { | |
| return String(s).replace(/[&<>"'\/]/g, function(s) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% if page.post-link %} | |
| <h2><a href="{{ page.post-link }}">{{ page.title }}</a></h2> | |
| {% else %} | |
| <h2> {{ page.title }} </h2> | |
| {% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>beforeRunningCommand</key> | |
| <string>nop</string> | |
| <key>bundleUUID</key> | |
| <string>C9BD1ADE-4FD9-4842-A641-DFB373B7D42C</string> | |
| <key>command</key> | |
| <string>#!/usr/bin/env ruby |