Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mrichardson23
mrichardson23 / skeltrack.pde
Created February 6, 2012 14:37
Skeleton Tracking
import SimpleOpenNI.*;
SimpleOpenNI kinect;
PImage handImage;
void setup() {
kinect = new SimpleOpenNI(this);
kinect.enableDepth();
kinect.enableUser(SimpleOpenNI.SKEL_PROFILE_ALL);
kinect.setMirror(false);
@juwit
juwit / convert.sh
Created August 5, 2018 14:48
convert canon RAW (.CR2) to JPG
sudo apt-get install dcraw
# convert CR2 to PPM
for i in *.CR2; do dcraw $i; done
# convert PPM to JPG
for i in *.ppm; do convert $i $(basename $i .ppm).jpg; done
# remove intermediate PPM files
rm *ppm
@stefanozanella
stefanozanella / cnxsoft.md
Last active June 12, 2023 23:05
Emulate a Raspberry Pi with Qemu+ KVM

Booting with CNXSoft image

Reference: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/

curl -O https://dl.dropbox.com/u/45842273/2012-07-15-wheezy-raspian-minimal.img.7z

yum install p7zip
7za e 2012-07-15-wheezy-raspian-minimal.img.7z

qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda 2012-07-15-wheezy-raspian-minimal.img -net nic -net user -vnc :0 -net tap,ifname=vnet0,script=no,downscript=no
@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active July 16, 2023 15:33
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@yeokm1
yeokm1 / Read-only FS on Arch Linux ARM.md
Last active August 18, 2023 05:43
Set up Arch Linux ARM on Raspberry Pi to boot from and use a read-only file-system

Read-only FS on Arch Linux ARM

Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system.

Full instructions and explanations are obtained from this link but you can run these commands directly. I modified some of the instructions for personal convenience.

Login with default username: alarm, password: alarm

#Optionally enable root over SSH. The rest of these instructions assume u are in root.
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active March 15, 2024 15:56
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@bradmontgomery
bradmontgomery / dummy-web-server.py
Last active April 15, 2024 14:27
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python (Updated for Python 3.7)
Usage:
./dummy-web-server.py -h
./dummy-web-server.py -l localhost -p 8000
Send a GET request:
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git