Skip to content

Instantly share code, notes, and snippets.

View hlian's full-sized avatar
🦫
beaver

Hao Lian hlian

🦫
beaver
View GitHub Profile
@sleexyz
sleexyz / Flowtype.md
Last active February 12, 2017 19:54
Flow stuff
@shauns
shauns / slack.py
Created August 10, 2016 14:44
Deleting and listing slack files, sorting by size
from slacker import Slacker
import itertools
slack = Slacker('<API TOKEN>')
pages = slack.files.list(page=1).body['paging']['pages']
all_the_files = list(itertools.chain(*[slack.files.list(page=i).body['files'] for i in range(1,pages + 1)]))
biggest_first = sorted(all_the_files, key=lambda f: f['size'], reverse=True)
@choppsv1
choppsv1 / emacs-24.4-24bit.diff
Last active September 14, 2017 16:23
True color (24-bit) terminal support for Emacs 24.4
This diff is a modified version of a diff written by Rüdiger Sonderfeld.
The original diff can be found here:
http://emacs.1067599.n5.nabble.com/RFC-Add-tty-True-Color-support-tt299962.html
To enable the feature one must set one of 2 environment variables either
ITERM_24BIT or KONSOLE_DBUS_SESSION. The former will enable ITU T.416 mode, the
latter will use semi-colon seperators used by other terminals (and also
supported by iterm development branch).
@dpatti
dpatti / mechanics.md
Last active November 8, 2022 23:22
Binding of Isaac Mechanics Guide

Binding of Isaac Mechanics Guide

Stats

Health

Each character starts with the following health

  • Isaac: 3
  • Maggy: 4
  • Cain: 2
  • Judas: 1
@hlian
hlian / profile.ps1
Created February 29, 2012 22:32
powershell profile!
function Check-Resolve {
hg resolve -l | ForEach-Object { Select-String '<<<' $_.Split()[1] }
}
Set-Alias cr Check-Resolve
function Grep-Service($regex) {
Get-Service | ? { $_.Name -match $regex }
}
@hlian
hlian / gist:964009
Created May 10, 2011 06:41
playerless: post-hao
# Report 7 - Session 5 - Time Profile of game
SharkProfileViewer
# Generated from the visible portion of the outline view
+ 97.9%, start, game
| + 97.9%, main, game
| | + 86.5%, GLUTMainLoop(), game
| | | + 86.5%, glutMainLoop, GLUT
| | | | + 86.5%, -[GLUTApplication run], GLUT
| | | | | + 86.3%, __glutProcessWorkEvents, GLUT
| | | | | | + 86.3%, processWindowWorkList, GLUT