Create documentation for your projects. Like so:
- Up/Down - Previous/Next Gist
- Ctrl+e - Edit a selected Gist
- Ctrl+s - Save Gist
default partial alphanumeric_keys modifier_keys | |
xkb_symbols "pc105" { | |
key <ESC> { [ Escape ] }; | |
// The extra key on many European keyboards: | |
key <LSGT> { [ less, greater, bar, brokenbar ] }; | |
// The following keys are common to all layouts. | |
key <BKSL> { [ backslash, bar ] }; |
当前分支上, 本地已经有多个 commit 了. 此时想将这些零散的 commit 合并成一个.
context menu -> git -> repository -> rebase
勾选 interactive
onto 选定的是 remote 上对应当前本地分支的分支. 如 refs/remotes/origin/master
from 什么都不选
使用工具: pyamsoft/pstate-frequency
example :
# set max cpu freq to 60%
sudo pstate-frequency -d -S -m 60
#!/usr/bin/python | |
__author__ = 'jonny' | |
import re | |
import commands | |
import time | |
kbid_pattern = re.compile('(?<=id=)\d+', re.I) | |
masterid_pattern = re.compile('\d+(?=\)\])', re.I) |
echo -n "test message" | nc -4u -w1 [host] [udp port]
# Rime alternative settings | |
# encoding: utf-8 | |
# | |
# difference from default settings: | |
# 1. ascii-style punctuation in half-shape mode | |
# 2. [ ] as paging keys | |
# | |
# save this file as: | |
# (Linux) ~/.config/ibus/rime/alternative.yaml | |
# (Mac OS) ~/Library/Rime/alternative.yaml |
$ cvt 2048 1152 60.0
获取对应分辨率和刷新率的信息
# 2048x1152 @ 60.00 Hz (GTF) hsync: 71.52 kHz; pclk: 197.97 MHz Modeline "2048x1152_60.00" 197.00 2048 2184 2400 2752 1152 1155 1160 1195 -hsync +vsync
$ xrandr --newmode "2048x1152_60.00" 197.00 2048 2184 2400 2752 1152 1155 1160 1195 -hsync +vsync
使用第一步获得的信息, 创建新的 mode.
'use strict'; | |
const zlib = require('zlib'); | |
const orgStr = 'Node is similar in design to, and influenced by, systems like Ruby\'s Event Machine or Python\'s Twisted. Node takes the event model a bit further, it presents an event loop as a runtime construct instead of as a library. In other systems there is always a blocking call to start the event-loop. Typically behavior is defined through callbacks at the beginning of a script and at the end starts a server through a blocking call like EventMachine::run(). In Node there is no such start-the-event-loop call. Node simply enters the event loop after executing the input script. Node exits the event loop when there are no more callbacks to perform. This behavior is like browser JavaScript — the event loop is hidden from the user.HTTP is a first class citizen in Node, designed with streaming and low latency in mind. This makes Node well suited for the foundation of a web library or framework.Just because Node is designed without threads, doesn\'t mean you canno |