Skip to content

Instantly share code, notes, and snippets.

Donald Merand dmerand

Block or report user

Report or block dmerand

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@psobot
psobot / randomthumbs.rb
Created Apr 22, 2012
Random Image Thumbnailer
View randomthumbs.rb
# Hacky random image thumbnailer.
# by Peter Sobot, April 21, 2012
# Based heavily on code by Michael Macias
# (https://gist.github.com/a54cd41137b678935c91)
require 'rmagick'
images = Dir.glob(ARGV[0] ? ARGV[0]
: '-default-input-paths-')
output_dir = (ARGV[1] ? ARGV[1]
@jboner
jboner / latency.txt
Last active Aug 18, 2019
Latency Numbers Every Programmer Should Know
View latency.txt
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
@blacktm
blacktm / install_ruby_rpi.sh
Last active Aug 14, 2019
A Bash script to install Ruby 2.6 on the Raspberry Pi (Raspbian)
View install_ruby_rpi.sh
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Installs Ruby 2.6 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
#
# Run from the web:
# bash <(curl -s https://gist.githubusercontent.com/blacktm/8302741/raw/install_ruby_rpi.sh)
# --------------------------------------------------------------------------------------------
# Welcome message
@paniq
paniq / pico8.txt
Last active May 26, 2019
PICO-8 hacks & secrets
View pico8.txt
Screen resolutions
------------------
PICO-8 supports different undocumented videomodes that can be activated at runtime,
using poke(0x5F2C, X) where X is one of the following mode numbers:
0: 128x128, 0 pages
1: 64x128, 1 page
2: 128x64, 1 page
3: 64x64, 3 pages
@stonehippo
stonehippo / IoT_hardware_platforms.md
Last active Jul 13, 2019
A compendium of data and communications platforms for the Internet of Things
View IoT_hardware_platforms.md

#some hardware platforms I find interesting

  • MESH — drop-in DIY IoT components
  • Particle — Connected prototyping for wifi and cell-based products
  • Hologram — similar to Particle
  • Electric Imp — Connected device platform, with modules and services
  • Intel Edison — Tiny x86-class board
  • C.H.I.P — $9 computing platform
  • bluz — BLE boards, compatible with Particle Cloud
  • Digistump Oak — ESP8266-based Wifi board, compatible with Particle Cloud
@kometbomb
kometbomb / tweetjam.md
Last active Aug 17, 2019
PICO-8 tweetjam stuff
View tweetjam.md

PICO-8 size optimization stuff

Here are some simple ways to make your PICO-8 code fit in 140 characters (as in the tweetjam craze). I did not invent these, I merely observed and collected them from the tweetjam thread.

LUA syntax stuff

  • Use single character variable names
  • Use x=.1 and x=.023, not x=0.1 or x=0.023
  • x=1/3 is shorter than x=.3333
  • You don't need to separate everything with spaces or write them on their own lines, e.g. circ(x,y,1)pset(z,q,7) works just as well
@mego22
mego22 / tmate-slave-ubuntu-1604.md
Last active Apr 26, 2018
Tmate-slave on Ubuntu 16.04
View tmate-slave-ubuntu-1604.md

Install dependincies

apt-get install  git-core build-essential pkg-config libtool libevent-dev libncurses-dev zlib1g-dev automake libssh-dev cmake ruby

Install msgpack >= 1.2.0

cd /tmp
git clone https://github.com/msgpack/msgpack-c.git
./create_keys.sh
You can’t perform that action at this time.