Skip to content

Instantly share code, notes, and snippets.

View NicholasTD07's full-sized avatar

Nicholas T. NicholasTD07

  • Sydney, Australia
View GitHub Profile
@NicholasTD07
NicholasTD07 / .vimrc
Created April 13, 2012 04:16 — forked from ninehills/.vimrc
VIMRC
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 一般设定
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 设定主题
colo evening
" 设定默认解码
set fenc=utf-8
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936
@NicholasTD07
NicholasTD07 / groupStaff
Created April 28, 2012 13:06
strangeProblemOfPython
def groupStaff(self, Id, grpNum) :
self.log("\t\t{}号员工分组(第{}组)操作:"\
.format(Id, grpNum))
# 1. 初始化局部变量
unGrpIDs = self.__unGrpIDs
groups = self.__groups
staff = self.__staffs[Id]
# 2. 检查员工是否处于 IDLE 状态
@NicholasTD07
NicholasTD07 / i3config
Created October 31, 2012 07:32
i3config file
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@NicholasTD07
NicholasTD07 / i3status.conf
Created October 31, 2012 07:34
i3status config file
general {
colors = true
interval = 5
}
#order += "ipv6"
order += "load"
order += "ethernet eth0"
@NicholasTD07
NicholasTD07 / VocVocInV2EX.md
Created December 4, 2012 15:15
VocVoc description in V2EX.com

VocVoc

用来辅助记忆单词的小助手.

为什么写 VocVoc?

当我在准备 GRE 单词的时候, 面对那么多单词, 长相都差不多, 但是读音却不同, 我很想有一个简单方便的软件能够播放输入单词的读音. 并且我还希望, 当我键入一个单词之后, 可以在某些网站上搜索这个单词, 显示其上下文, 便于我理解记忆这个单词的意义.

所以 VocVoc 的基本功能便是播放单词的读音.

VocVoc

VocVoc 是学习单词的小助手.

可以用它来做什么?

  • 或许, 你不确定单词的拼写.
  • 或许, 你正在记忆许多的单词.
@NicholasTD07
NicholasTD07 / chromebook.md
Created December 4, 2012 15:42
Why I like the ARM Chromebook.

Chromebook with ARM

    1. 11.6’’ (1366x768) display
    1. 0.7 inches thin – 2.42 lbs / 1.1 kg
    1. Over 6.5 hours of battery
    1. Samsung Exynos 5 Dual Processor
    1. 100 GB Google Drive Cloud Storage2 with 16GB Solid State Drive
    1. Built-in dual band Wi-Fi 802.11 a/b/g/n
    1. VGA Camera
    1. 1x USB 3.0, 1x USB 2.0
@NicholasTD07
NicholasTD07 / readLines.py
Created December 18, 2012 03:23
Read certain lines and split the file.
#!/usr/bin/env python3
# Read lines.
def readLines(filePath, howManyLines=500) :
lines = list()
with open(filePath) as theFile :
number = 0
while True :
for i in range(0, howManyLines) :
line = theFile.readline()
#!/bin/sh
# Warning!
# if you DIY a stage package like this,
# you must use the Stage3`s /etc/udev/*
# or rm /etc/udev/rules.d/70*
# Warning!
# last edited by likuku on 2012.03.29
DATE=`date +%Y_%m_%d_%H_%M_%S`
ARCH=`uname -m`
// Try this in 32bit and 64bit iOS Simulator.
// In 32bit one, both tests pass.
// In 64bit one, - (void)testStubWorksForYES fails.
// Test support
#import <XCTest/XCTest.h>
#define MOCKITO_SHORTHAND
#import <OCMockito/OCMockito.h>