Skip to content

Instantly share code, notes, and snippets.

@jnwhiteh
jnwhiteh / install-ljitrocks.sh
Created August 4, 2011 14:49
Install luajit+luarocks in sandboxed environment
#!/usr/bin/env bash
set -e
die() {
echo "$1";
exit 1;
}
# Fetch and install LuaJIT/LuaRocks into the local directory
@dideler
dideler / bootstrapping.md
Last active April 8, 2024 04:15
Bootstrapping - a list of useful resources to get up and running quickly

Welcome!

UPDATE: This list is no longer maintained. I've moved it to its own repo so you can send suggestions as Pull Requests. https://github.com/dideler/bootstrapping/

For feedback or suggestions, please send a tweet (@dideler). Gist comments don't notify me. Pull requests aren't possible with gists (yet), so I don't recommend forking because then I can't easily get the change.

Starring this gist will give me an idea of how many people consider this list useful.

@spion
spion / a-warning.md
Last active March 25, 2024 03:01
C++ versus V8 versus luajit versus C benchmark - (hash) tables

Warning

This benchmark has been misleading for a while. It was originally made to demonstrate how JIT compilers can do all sorts of crazy stuff to your code - especially LuaJIT - and was meant to be a starting point of discussion about what exactly LuaJIT does and how.

As a result, its not indicative of what its performance may be on more realistic data. Differences can be expected because

  1. the text will not consist of hard-coded constants
@billroy
billroy / jsonio.py
Created September 21, 2012 13:38
Read/write JSON object from file in python
import simplejson
import json
def put(data, filename):
try:
jsondata = simplejson.dumps(data, indent=4, skipkeys=True, sort_keys=True)
fd = open(filename, 'w')
fd.write(jsondata)
fd.close()
except:
@julionc
julionc / 00.howto_install_phantomjs.md
Last active April 26, 2024 09:13
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@josefnpat
josefnpat / readme.md
Last active April 7, 2024 11:39
Going from Lua 5.2 to PICO-8's Lua

This information applies to the PICO-8 0.1.6 release.

This document is here to help folks with a proficiency in Lua understand the limitations and discrepencies between Lua and PICO-8's Lua.

You can always view the manual or yellowafterlife's extended 0.1.1 manual.

General

  • anything written in uppercase the PICO-8 editor or .p8 is made lowercase by the editor. → editing the .p8 file directly can work
  • print(function() end) outputs the string function instead of the string function: 0x0000000.
@tomysmile
tomysmile / rpi-configure-locales.md
Last active June 29, 2023 14:37
Raspberry Pi: Reconfigure Locales

Reconfigure your RPi Locales

First you need to install the locales you want:

sudo dpkg-reconfigure locales

Then refresh your current environment:

@btroncone
btroncone / ngrxintro.md
Last active February 9, 2024 15:37
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@FiloSottile
FiloSottile / categorizing.sql
Created July 2, 2016 23:32
Go vendoring BigQuery
SELECT f.repo_name, s.num_stars
FROM [copper-diorama-131213:github.go_repos_files] AS f
JOIN [copper-diorama-131213:github.2015_2016_stars] AS s
ON f.repo_name = s.repo_name
WHERE f.path LIKE 'Godeps/_workspace/%'
GROUP BY f.repo_name, s.num_stars
ORDER BY s.num_stars DESC
SELECT f.repo_name, s.num_stars
FROM [copper-diorama-131213:github.go_repos_files] AS f