Skip to content

Instantly share code, notes, and snippets.

View staticor's full-sized avatar

SteveYagn staticor

View GitHub Profile
@mitoop
mitoop / hhkb.md
Last active February 4, 2023 08:59
HHKB

蓝牙连接

既然是双模版,自然就有“有线连接”和“蓝牙连接”这2种方式。

有线连接比较直白,就是插上Type-C线,另一头连上电脑,然后长按电源键打开键盘,并且通过组合键Fn+Control+0切换到有线模式即可。

而对于蓝牙连接,在开启键盘后,如果键盘指示灯是蓝色常亮,我们需要通过组合键:Fn+Q或点按一下电源键进入蓝牙配对模式,指示灯也会如下图这样开始闪烁。

接着再输入Fn+Control+1、2、3、4(四选一),指定一个未使用的蓝牙设备序号。这时闪烁速度会加快,键盘进入待配对模式。

@staticor
staticor / why-curry-helps.md
Created July 30, 2020 13:03 — forked from jcouyang/why-curry-helps.md
为什么要柯里化(why-curry-helps)slide http://git.io/why-curry-helps 📈

还记得 Haskell Curry吗,

多巧啊, 人家姓 Curry 名 Haskell, 难怪 Haskell 语言会自动柯里化, 呵呵. 但是不奇怪吗, 为什么要柯里化呢. 为什么如此重要导致 Haskell 会默认自动柯里化所有函数, 不就是返回一个部分配置好的函数吗.

我们来看一个 Haskell 的代码.

max 3 4
(max 3) 4
@ddupg
ddupg / install_protobuf2.5_on_ubuntu.md
Last active March 5, 2024 18:10
install protobuf 2.5 on ubuntu
wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
tar xvf protobuf-2.5.0.tar.gz
cd protobuf-2.5.0
./autogen.sh
./configure --prefix=/usr
make
sudo make install
protoc --version
# Rime schema
# encoding: utf-8
schema:
schema_id: double_pinyin_flypy
name: 小鶴雙拼
version: "0.18"
author:
- double pinyin layout by 鶴
- Rime schema by 佛振 <chen.sst@gmail.com>
@staticor
staticor / findhao_rss_sources.xml
Created December 5, 2018 09:30 — forked from FindHao/findhao_rss_sources.xml
我的rss订阅源
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<opml version="1.0">
<head>
<title>
Subscriptions of find from Inoreader [https://www.inoreader.com]
</title>
</head>
<body>
<outline text="Blogs" title="Blogs">
<outline text="cgnail's weblog" title="cgnail's weblog" type="rss" xmlUrl="http://cgnail.github.io/atom.xml" htmlUrl="http://cgnail.github.io/"/>
@FindHao
FindHao / findhao_rss_sources.xml
Last active October 19, 2019 10:42
我的rss订阅源
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<opml version="1.0">
<head>
<title>
Subscriptions of find from Inoreader [https://www.inoreader.com]
</title>
</head>
<body>
<outline text="Blogs" title="Blogs">
<outline text="cgnail's weblog" title="cgnail's weblog" type="rss" xmlUrl="http://cgnail.github.io/atom.xml" htmlUrl="http://cgnail.github.io/"/>
@singlepig
singlepig / squirrel.custom.yaml
Created December 10, 2017 18:17
Rime主题配色,模仿官网rime.im配图
# modified from https://gist.github.com/deamwork/7cfb49777c2f163a475c71521cf7dd6e
# preview https://i.loli.net/2017/12/11/5a2d782e2f695.png
rimeblue:
name: "RimeBlue"
horizontal: false # 候选条横向显示
inline_preedit: true # 启用内嵌编码模式,候选条首行不显示拼音
candidate_format: "%c.\u2005%@\u2005" # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间。
corner_radius: 10 # 候选条圆角半径
border_height: 0 # 窗口边界高度,大于圆角半径才生效
@varreli
varreli / gist:6ed319b53132e4dbab98f82e64801aac
Created June 1, 2017 00:32
terminal output of installation of vim and haskell-vim-now
~ $ sudo apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
vim-doc vim-scripts
The following NEW packages will be installed:
vim
0 upgraded, 1 newly installed, 0 to remove and 316 not upgraded.
Need to get 0 B/976 kB of archives.
@staticor
staticor / get_data_mysql.sh
Created February 17, 2016 03:03
mysql retrieve data in Shell.
function run_Mysql()
{
mysql --default-character-set=utf8 \
-h 192.168.156.120 \
-u data -p'PIN239!@#$%^&8' \
-D optimus \
-e "
select platform, day
, SUM(bid) as bid , SUM(imp) as imp
@staticor
staticor / class_decorator.py
Created January 28, 2016 03:10 — forked from phith0n/class_decorator.py
class decorator
class Tx(object):
def __init__(self):
print("Tx:init")
self.something()
def something(self):
print("Tx:something")
def otherthing(self):
print("Tx:otherthing")