Skip to content

Instantly share code, notes, and snippets.

View serverhiccups's full-sized avatar

serverhiccups serverhiccups

View GitHub Profile

Keybase proof

I hereby claim:

  • I am serverhiccups on github.
  • I am serverhiccups (https://keybase.io/serverhiccups) on keybase.
  • I have a public key ASDTchcgaki3Wjx7KzHxlIHslXPGFRqcX43JL2Gumy64Ggo

To claim this, I am signing this object:

@serverhiccups
serverhiccups / installNodeOnDPLY.sh
Created November 26, 2016 01:00
Install node on my button
if [ ! -f /installed.txt ]; then
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
apt-get install -y nodejs npm
npm install -g scratchapi
cd /root
npm init -y
touch /installed.txt
fi
@serverhiccups
serverhiccups / hiccups.terminal
Last active December 4, 2016 05:39
My Terminal.app config
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BackgroundBlur</key>
<real>0.092837791997573277</real>
<key>BackgroundColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OV05TV2hpdGVcTlNDb2xvclNwYWNlViRjbGFzc00w
@serverhiccups
serverhiccups / .profile
Last active September 2, 2017 04:22
my profile
#!/bin/bash
#tmux
EVENT_NOKQUEUE=1
alias tm='tmux attach || tmux new' #Because having multiple sessions is fiddly
#SSH
alias rpi='rpi' # see ~/.ssh/config
alias rpix="xterm -e 'ssh rpi -Y lxsession'" # Start xterm (in XQuartz) and ssh into my pi and run lxde
alias rpim="mosh rpi"
alias macserver="ssh macserver"
0 0 6 0 4 0 0 9 7
0 4 0 7 3 0 0 1 0
0 1 7 0 9 2 0 3 0
6 0 0 0 7 0 0 8 0
1 0 5 0 6 0 9 0 3
0 2 0 0 1 0 0 0 6
0 5 0 9 8 0 1 6 0
0 9 0 0 5 6 0 7 0
8 6 0 0 2 0 3 0 0
@serverhiccups
serverhiccups / sudoku.cpp
Last active January 9, 2020 02:55
Min sudoku lösare
/*
Sodoku Solver and Checker v1.1.
By serverhiccups, 2019.
This file is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
The license is available here: https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
*/
#include<vector>
#include<iostream>
#include<set>
#include<utility>
/* Water Flow Simulation Test
Key Ideas:
The model that describes the network is stored seperately from the model that does the calculations
*/
class Network {
constructor() {
this.network = [];
this.builtNetwork = [];
this.sources = [];
@serverhiccups
serverhiccups / processobj.js
Created January 29, 2021 22:37
Extract geometry from a .obj file into a format suitable for Scratch.
let fs = require("fs")
let filename = process.argv[2]
let obj = fs.readFileSync(filename).toString();
let v = obj.split("\n").filter((line) => {
return line.split(" ")[0] == "v"
}).map((line) => {
return line.split(" ");
})
let f = obj.split("\n").filter((line) => {
return line.split(" ")[0] == "f"