Skip to content

Instantly share code, notes, and snippets.

View wil3's full-sized avatar

Wil Koch wil3

View GitHub Profile
@ryin
ryin / tmux_local_install.sh
Last active October 2, 2024 14:23
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@SneakyBrian
SneakyBrian / CAPTCHA.js
Created March 20, 2013 22:47
Implementing CAPTCHA client-side using HTML5 canvas
(function (window, document, $, undefined) {
var possibleCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
var defaults = {
selector: "#captcha",
text: null,
randomText: true,
randomColours: true,
@thomasfr
thomasfr / iptables.sh
Last active October 17, 2024 07:55
iptable rules to allow outgoing DNS lookups, outgoing icmp (ping) requests, outgoing connections to configured package servers, outgoing connections to all ips on port 22, all incoming connections to port 22, 80 and 443 and everything on localhost
#!/bin/bash
IPT="/sbin/iptables"
# Server IP
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')"
# Your DNS servers you use: cat /etc/resolv.conf
DNS_SERVER="8.8.4.4 8.8.8.8"
# Allow connections to this package servers
@0xjac
0xjac / private_fork.md
Last active November 16, 2024 18:10
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@x29a
x29a / update.sh
Created January 7, 2017 20:41
SPDYN/SPDNS update via bash
#!/bin/bash
# registered domains. might be the same for v4 and v6
DOMAINV4=foobar.my-router.de
DOMAINV6=${DOMAINV4}
# generated token for each domain
TOKENV4=abcd-abcd-abcd
TOKENV6=abcd-abcd-abcd
@cs8425
cs8425 / MSPCodes.js
Last active November 8, 2024 11:16
read 'USB Simulator Cable' as joystick and send to betaflight SITL via MSP over tcp.
// from https://github.com/betaflight/betaflight-configurator
'use strict';
//MSPCodes needs to be re-integrated inside MSP object
var MSPCodes = {
MSP_API_VERSION: 1,
MSP_FC_VARIANT: 2,
MSP_FC_VERSION: 3,
MSP_BOARD_INFO: 4,
MSP_BUILD_INFO: 5,