Skip to content

Instantly share code, notes, and snippets.

View NicholasTD07's full-sized avatar

Nicholas T. NicholasTD07

  • Sydney, Australia
View GitHub Profile
# Using this script downloads ALL the videos in NSScreencast.
# Use it wisely, it's extra load/bandwidth for the NSScreencast website.
# Usage: `EMAIL=your email PASSWORD=your password END=how many videos should be downloaded? ruby download-nsscreencast.rb`
require "mechanize"
require "parallel"
mechanize = Mechanize.new
mechanize.post("https://www.nsscreencast.com/user_sessions", {"email" => ENV["EMAIL"], "password" => ENV["PASSWORD"]})
mechanize.pluggable_parser.default = Mechanize::Download
$("<input/>", {
id: "permissionsInput",
name: "permissions",
type: "checkbox",
click: function(){
update();
},
checked: "checked"
}).appendTo("#myForm");
var arr = [ "one", "two", "three", "four", "five" ];
jQuery.each(arr, function(index, value) {
console.log(this);
return (this != "three"); // will stop running after "three"
});
@NicholasTD07
NicholasTD07 / vundle-with-bootstrap.vim
Created January 14, 2015 00:01
Minimum Vundle Setup with Bootstrap
" To test this file in isolation,
" put it in a folder other then ~/,
" then run 'vim -u vundle-with-bootstrap.vim'.
set nocompatible
filetype off
" modified bootstrap, originally by John Whitley
" https://github.com/jwhitley/vimrc/blob/master/.vim/bootstrap/bundles.vim
// 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>
#!/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`
@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()
@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

VocVoc

VocVoc 是学习单词的小助手.

可以用它来做什么?

  • 或许, 你不确定单词的拼写.
  • 或许, 你正在记忆许多的单词.
@NicholasTD07
NicholasTD07 / VocVocInV2EX.md
Created December 4, 2012 15:15
VocVoc description in V2EX.com

VocVoc

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

为什么写 VocVoc?

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

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