Skip to content

Instantly share code, notes, and snippets.

View chadluo's full-sized avatar
🟢
pls gib green

Chad Luo chadluo

🟢
pls gib green
  • Sydney
  • 02:22 (UTC +11:00)
View GitHub Profile
@chadluo
chadluo / yamabuki.vimp
Last active August 29, 2015 13:57
vimperator colorscheme yamabuki.
" vimperator colorscheme yamabuki // #F8B500
" created by yukirock.
highlight! Normal color: #FFF; font-family: Monaco; background: #333631;
highlight! CmdLine color: #FFF; font-family: Monaco; background: #333631;
highlight! StatusLine color: FFF; font-family: Monaco;
highlight! PromptText color: #F8B500; background: #F8B500;
highlight! CompGroup:not(:first-of-type) margin: 0;
highlight! CompTitle font-weight: bold; color: #FFF; background: #333631; line-height: 1.6;
highlight! CompTitle>* color: #FFF;
@chadluo
chadluo / installed packages
Last active August 29, 2015 13:57
installed packages
acpi
alsa-utils
amule
apache
arandr
arch-firefox-search
aria2
audacious
audacious-plugins
autoconf
@chadluo
chadluo / rename.pl
Created May 7, 2014 14:36
rename Hexo md files to Jekyll style.
#!/usr/bin/perl
use strict;
use warnings;
opendir(D,".");
my @files = readdir(D);
closedir(D);
foreach my $file (@files) {
@chadluo
chadluo / genLine.pl
Last active August 29, 2015 14:01
for 2911 ass2
#!/usr/bin/perl
use strict;
use warnings;
my $lines = 15;
$lines = $ARGV[0] if (scalar @ARGV == 1);
for (my $i = 0; $i<$lines; $i++) {
print "Line between ".int(rand(20))." ".int(rand(20))." and ".int(rand(20))." ".int(rand(20))."\n";
#!/usr/bin/perl
use strict;
use warnings;
for (my $i=0; $i<10; $i++) {
print int(rand(3))."\n";
}
@chadluo
chadluo / new.pl
Last active August 29, 2015 14:01
generate new Jekyll post with CLI arguments
#!/usr/bin/perl
use strict;
use warnings;
use POSIX qw(strftime);
my $category = "chatter";
my $permalink = "";
if (scalar @ARGV == 1) {
$permalink = $ARGV[0];
@chadluo
chadluo / reverse.pl
Last active August 29, 2015 14:02
reverse stack recursively at O(n) time and O(n) space. reimplementation of http://www.zhihu.com/question/24020049/answer/26440695
#!/usr/bin/env perl
use strict;
use warnings;
sub rev {
my $q = pop;
if (scalar @_ == 0) {
return @{$q};
} else {
@chadluo
chadluo / config.json
Last active August 29, 2015 14:10 — forked from anonymous/config.json
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@chadluo
chadluo / wikiwand.css
Created December 5, 2014 09:29
wikiwand.css
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("http://www.wikiwand.com/en") {
.narrow_column {
width: 700px;
}
p { -moz-hyphens: auto; }
@chadluo
chadluo / scannertester.py
Created March 4, 2015 15:05
tester for 3131 assignment scanner
#!/usr/bin/env python
"""test script for scanner assignment."""
import difflib
import glob
import subprocess
path = "./Scanner/*.vc"
for vc in glob.glob(path):
print("\nTesting: " + vc + "\n")