Skip to content

Instantly share code, notes, and snippets.

View rtu's full-sized avatar
🎯
Focusing

Tony Tu rtu

🎯
Focusing
  • Canada
View GitHub Profile
@javierarques
javierarques / protractorAPICheatsheet.md
Last active March 3, 2025 17:08
Protractor API Cheatsheet
@seansummers
seansummers / cph.py
Last active April 17, 2020 17:08
Jython classPathHacker to load JDBC
def loadJar(jarFile):
'''load a jar at runtime using the system Classloader (needed for JDBC)
adapted from http://forum.java.sun.com/thread.jspa?threadID=300557
Author: Steve (SG) Langer Jan 2007 translated the above Java to Jython
Reference: https://wiki.python.org/jython/JythonMonthly/Articles/January2007/3
Author: seansummers@gmail.com simplified and updated for jython-2.5.3b3+
>>> loadJar('jtds-1.3.1.jar')
>>> from java import lang, sql
@nickloewen
nickloewen / bret_victor-reading_list.md
Last active August 24, 2025 17:43
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★

@ronaldsuwandi
ronaldsuwandi / config.fish
Last active July 30, 2021 07:54
My personal fish shell config for OS X. Supports git branch (fast git checks), virtualenv (if installed) and Kubernetes current context
function ls --description 'List contents of directory'
command ls -lFG $argv
end
function subl --description 'Launches sublime text in a new window'
command subl -n $argv
end
function code --description 'Launches visual code studio in a new window'
command code -n $argv
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@Brunas
Brunas / Daily Dilbert.md
Last active June 6, 2018 18:20
Daily Dilbert widget for Dashing

Description

This is Dashing widget and all components needed to retrieve, store and show daily strips from Dilbert. It is inspired by RandomAww widget.

##Usage

The latest version of this widget needs my slightly improved standard image widget. Put the daily_dilbert.rb file in your /jobs folder.

Make sure directory /assets/images/daily_dilbert is created and accessible by Dashing user.

@nhoffman
nhoffman / pyscript.py
Last active September 8, 2025 11:00
Python script template
#!/usr/bin/env -S uv run --script --quiet
# /// script
# requires-python = ">=3.13"
# dependencies = []
# ///
"""A simple python script template.
"""
@jboner
jboner / latency.txt
Last active October 31, 2025 03:43
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD