Skip to content

Instantly share code, notes, and snippets.

@mislav
mislav / pagination.md
Created October 12, 2010 17:20
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o

@jboner
jboner / latency.txt
Last active November 19, 2024 14:58
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
@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active September 12, 2024 16:16
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@staltz
staltz / introrx.md
Last active November 19, 2024 13:42
The introduction to Reactive Programming you've been missing
@andrewlkho
andrewlkho / gist:23b5b5bcf853b3473421
Last active June 23, 2018 00:24
How to install debian to a USB drive for use on a MacBook Air

This guide shows how to install debian so that it can be booted and run from a USB drive on a MacBook Air. I use this to store a copy of my PGP master keypair. Networking is deliberately not configured and all operations requiring the master keypair (such as signing other people's keys) are done only on this system. See the debian wiki for information on how to separate your key. Note that this is slightly different to using a live CD. It is not possible to tailor the base configuration of a live CD to one's own requirements, and they frequently automatically connect to the nearest local network. Nevertheless, if you wish to use a live CD instead, I recommend Tails. Arturo Filastò has written a similar guide for Tails.

The method I use requires [VirtualBox][4], which should also contain a working debian installation itself. An alternative method would be to use [debootstrap][5] b

@john2x
john2x / 00_destructuring.md
Last active August 23, 2024 07:45
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

@kachayev
kachayev / concurrency-in-go.md
Last active November 19, 2024 02:40
Channels Are Not Enough or Why Pipelining Is Not That Easy
@ohanhi
ohanhi / frp.md
Last active May 6, 2024 05:17
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

Simple Security Guidelines

Using an iDevice? (Best option)

  • Use an iPod or an iPad without a SIM card
  • Use an iPhone
  • Do not jailbreak
  • Always upgrade to new iOS versions
  • Use Brave browser

Need Secure chat?

@preslavrachev
preslavrachev / setting-up-a-new-mac-for-development.md
Last active September 8, 2017 16:11
Some important steps and tools for setting up a new Mac and making it ready for development (in particular, Java development, but most of the steps matter for others too)

Setting Up a New Mac for Development

Command-Line Utilities

Homebrew

An absolute must. If you have ever worked with apt-get on Ubuntu, you know that it's the absolute developer bliss. Homebrew (or brew for short) is the missing package manager for OSX. Not only does it allow you to install/unisnstall/manage software with a few simple commands, the same way that apt-get does. It allows you to access and install ports of most of the cross-platform utilities that you might be familiar with from Linux, over to OSX.

Installing Brew

Simply open a new terminal and execute the following command:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"