Skip to content

Instantly share code, notes, and snippets.

View singlepig's full-sized avatar

等车的猪 singlepig

  • 野生码农
  • nanjing-china
View GitHub Profile
@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 # 窗口边界高度,大于圆角半径才生效
sed 's/fastboot_tools\\//g' $1 | sed 's/\\/\//g' | bash
@singlepig
singlepig / flashnow.sh
Created March 2, 2017 07:07
unno刷机脚本
#!/usr/bin/env bash
CURRENTPATH=`pwd`
# if no find flash_all_qcn.cmd found in current path, exit
if [[ ! -e $CURRENTPATH/flash_all_qcn.cmd ]]; then
echo -e "\e[1;31m Not in daily build path, exit! \e[0m"
exit 1
fi
@singlepig
singlepig / classify.py
Created April 17, 2014 07:50
按文件名前缀分类文件。 一个目录下有很多形如2012-08-23 18.20.41.jpg的文件,要将这些文件进行分类,对于2012-08-23 18.20.41.jpg文件, 生成文件夹2012-08 ,将其放到文件夹内。
#!/usr/bin/env python
# encoding: utf-8
'''
按文件名前缀分类文件。
一个目录下有很多形如2012-08-23 18.20.41.jpg的文件,要将这些文件进行分类,对于2012-08-23 18.20.41.jpg文件,
生成文件夹2012-08 ,将其放到文件夹内。
'''
import sys