Skip to content

Instantly share code, notes, and snippets.

View cbranch's full-sized avatar
🦦
world otter day 31st may 2023

Chris Branch cbranch

🦦
world otter day 31st may 2023
View GitHub Profile
@cbranch
cbranch / debugdraw.js
Last active January 21, 2024 22:36
An implementation of the Box2D debug draw functionality for pixi.js
// Gets a JSDraw instance which renders to a PIXI graphics object.
// graphics: an instance of PIXI.Graphics
// scale: the scaling factor to convert from Box2D coordinates to screen pixels
function getPIXIDebugDraw(graphics, scale) {
function getColorFromDebugDrawCallback(color) {
var col = Box2D.wrapPointer(color, Box2D.b2Color);
var red = (col.get_r() * 255 * 255 * 255)|0;
var green = (col.get_g() * 255 * 255)|0;
var blue = (col.get_b() * 255)|0;
return red + green + blue;
@cbranch
cbranch / fruit.txt
Created February 25, 2015 08:17
Rust test
apple
banana
cherry
banana
apple
apple
damson
cherry
banana
#!/bin/bash
read -e -p "Type a username you will use to connect to the VPN: " VPN_USER
read -e -p "Type a password for that user in the VPN: " VPN_PASSWORD
# setup PPTP
apt-get install pptpd -y
echo "$VPN_USER pptpd $VPN_PASSWORD *" >>/etc/ppp/chap-secrets
echo "localip 10.0.0.1" >>/etc/pptpd.conf
echo "remoteip 10.0.0.100-200" >>/etc/pptpd.conf

Prerequisites

Install Debian 7.0 32-bit on your server.

You need to do a little configuration first. Log into your VPS's control panel (SolusVM CP link at the top, or the link in your welcome email) Enter the control panel username and password. You should see some information and statistics for your VPS, including bandwidth usage, disk usage etc. At the very bottom, there are two options for TUN/TAP 'On/Off' and PPP 'On/Off'. Both of these need to be set to 'On'. After changing each one, if it asks you if you want to reboot the server, click 'Yes'.

Keybase proof

I hereby claim:

  • I am cbranch on github.
  • I am otterdam (https://keybase.io/otterdam) on keybase.
  • I have a public key ASCltnAAKSoxGrMFM48V1kn2j7QpE_EriPhwbICJddsDOQo

To claim this, I am signing this object: