Skip to content

Instantly share code, notes, and snippets.

@simonewebdesign
simonewebdesign / install-quake3.sh
Last active November 14, 2023 19:25
Install Quake 3: Arena on a mac
#!/bin/bash
# Install Quake 3: Arena on a mac
# Copyright (c) 2016 simonewebdesign
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@staltz
staltz / introrx.md
Last active April 19, 2024 18:49
The introduction to Reactive Programming you've been missing
@hdragomir
hdragomir / sm-annotated.html
Last active March 5, 2024 08:57
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@remy
remy / easy-list.md
Last active January 4, 2016 06:19
Markdown pro tip: long numbered list made easier
  1. One
  • Two
  • Three
  • Four
  • Five

But really easy to re-sort because the items aren't really numbered:

1. one
@grantslatton
grantslatton / hngen.py
Last active September 27, 2021 11:07
A program that uses Markov chains to generate probabilistic Hacker News titles.
import urllib2
import re
import sys
from collections import defaultdict
from random import random
"""
PLEASE DO NOT RUN THIS QUOTED CODE FOR THE SAKE OF daemonology's SERVER, IT IS
NOT MY SERVER AND I FEEL BAD FOR ABUSING IT. JUST GET THE RESULTS OF THE
CRAWL HERE: http://pastebin.com/raw.php?i=nqpsnTtW AND SAVE THEM TO "archive.txt"
@zachleat
zachleat / reading_time.rb
Last active October 21, 2020 23:00
Read this in X minutes Liquid Filter Plugin (for Jekyll)
# Outputs the reading time
# Read this in “about 4 minutes”
# Put into your _plugins dir in your Jekyll site
# Usage: Read this in about {{ page.content | reading_time }}
module ReadingTimeFilter
def reading_time( input )
words_per_minute = 180
@sindresorhus
sindresorhus / blur-prank.user.js
Last active January 4, 2023 10:33
Blur prank UserScript
// ==UserScript==
// @name Dictionary
// @version 0.1
// @author Sindre Sorhus
// @include *
// ==/UserScript==
document.documentElement.style.webkitFilter='blur(0.5px)';
@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

@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"