Skip to content

Instantly share code, notes, and snippets.

View saralilyb's full-sized avatar
🤷‍♀️

Sara Burke saralilyb

🤷‍♀️
View GitHub Profile
@Zettt
Zettt / dayprojects.applescript
Last active December 3, 2024 11:02
Day Projects for OmniFocus
-- Day Projects
--
-- Created by Zettt on 2011-11-28
-- Mac OS X Screencasts.
--
-- This script creates "Day Projects" in OmniFocus.
--
-- I use these "Day Projects" to put stuff, that I need to
-- do on a specific day, but aren't big enough to be their own project.
-- Things like "Call the doctor on Wednesday" or
@jboner
jboner / latency.txt
Last active May 18, 2025 19:02
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
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@bricker
bricker / application.html.erb
Created June 21, 2012 22:47
Simple breadcrumbs for Rails
<!-- Simple breadcrumbs for Rails -->
<!-- Example output -->
<!-- This example uses the Twitter Bootstrap classes for breadcrumbs -->
<!-- http://twitter.github.com/bootstrap/components.html#breadcrumbs -->
<% if breadcrumbs %>
<ul class="breadcrumb">
<% breadcrumbs.each do |crumb| %>
<li>
--
-- open currently open URL in Safari in Chrome
-- forked from https://gist.github.com/3151932
--
property theURL : ""
tell application "Safari"
set theURL to URL of current tab of window 1
end tell
if appIsRunning("Google Chrome") then
@sudarkoff
sudarkoff / Makefile.pandoc
Last active June 12, 2020 15:13
Makefile for converting Markdown to various formats with Pandoc, TeX and kindlegen
BUILD_DIR := gen
# pandoc is a handy tool for converting between numerous text formats:
# http://johnmacfarlane.net/pandoc/installing.html
PANDOC := pandoc
# pandoc options
# Liberation fonts: http://en.wikipedia.org/wiki/Liberation_fonts
PANDOC_PDF_OPTS := --toc --chapters --base-header-level=1 --number-sections --template=virsto_doc.tex --variable mainfont="Liberation Serif" --variable sansfont="Liberation Sans" --variable monofont="Liberation Mono" --variable fontsize=12pt --variable documentclass=book
PANDOC_EBOOK_OPTS := --toc --epub-stylesheet=epub.css --epub-cover-image=cover.jpg --base-header-level=1
@adamwiggins
adamwiggins / adams-heroku-values.md
Last active November 27, 2024 17:06
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

(defn setup []
(smooth)
(no-fill))
(defn superformula-point [m n1 n2 n3 phi]
(let [t1 (pow (abs (cos (/ (* m phi) 4.0))) n2)
t2 (pow (abs (sin (/ (* m phi) 4.0))) n3)
r (pow (+ t1 t2) (/ 1 n1))]
(if (= 0 (abs r))
[0 0]
@jrhorn424
jrhorn424 / Fastmail-commented.plist
Last active February 20, 2016 14:53
Fastmail keybindings for MailMate
#####################################################################################################
### WARNING: not kept up to date. I don't know the format well, and comments were causing issues. ###
### See next file for up-to-date mappings. ###
#####################################################################################################
{
// Keybindings to emulate Fastmail shortcuts in MailMate
// From: http://fastmail.wikia.com/wiki/KeyboardShortcuts
// Created by Jeffrey Horn <[email protected]>
// See: http://manual.mailmate-app.com/key_binding_selectors
@dannypurcell
dannypurcell / trailing-slash-middleware
Created January 2, 2014 05:30
Ring middleware fn. Removes a trailing slash from the uri before calling the handler.
(defn ignore-trailing-slash
"Modifies the request uri before calling the handler.
Removes a single trailing slash from the end of the uri if present.
Useful for handling optional trailing slashes until Compojure's route matching syntax supports regex.
Adapted from http://stackoverflow.com/questions/8380468/compojure-regex-for-matching-a-trailing-slash"
[handler]
(fn [request]
(let [uri (:uri request)]
(handler (assoc request :uri (if (and (not (= "/" uri))