Skip to content

Instantly share code, notes, and snippets.

View gregwym's full-sized avatar
😁
Whow, status!

Greg Wang gregwym

😁
Whow, status!
View GitHub Profile
curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
echo "source ~/.git-completion.bash" >> ~/.bash_profile
@gregwym
gregwym / gfm.py
Created February 24, 2013 04:10 — forked from Wilfred/gfm.py
"""GitHub flavoured markdown: because normal markdown has some vicious
gotchas.
Further reading on the gotchas:
http://blog.stackoverflow.com/2009/10/markdown-one-year-later/
This is a Python port of GitHub code, taken from
https://gist.github.com/901706
To run the tests, install nose ($ easy_install nose) then:
@gregwym
gregwym / CocoaPodsSetup.md
Last active December 22, 2015 21:19 — forked from andrewsardone/gist:3889904
A quick cheat sheet for using CocoaPods

CocoaPods project setup

Create a Podfile at the root of your project

platform :ios, '5.0'

pod 'AFNetworking'
pod 'OHAttributedLabel'
@gregwym
gregwym / FindTopViewController.m
Last active January 6, 2016 02:47 — forked from snikch/gist:3661188
Find the current top view controller for your iOS application
- (UIViewController *)topViewController{
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController];
}
- (UIViewController *)topViewController:(UIViewController *)rootViewController
{
if (rootViewController.presentedViewController == nil) {
return rootViewController;
}
@gregwym
gregwym / wav-mp3
Created May 19, 2018 07:46 — forked from championofblocks/wav-mp3
Command line bash to convert all wav to mp3
for i in *.wav; do lame -b 320 -h "${i}" "${i%.wav}.mp3"; done
@gregwym
gregwym / Trie.ts
Last active May 3, 2021 23:12 — forked from tpae/Trie.js
Trie.ts - super simple JavaScript implementation
// Trie.ts - super simple JS implementation
// https://en.wikipedia.org/wiki/Trie
// -----------------------------------------
// we start with the TrieNode
class TrieNode<V> {
// we keep a reference to parent
public parent = null;