Skip to content

Instantly share code, notes, and snippets.

@red-stripe
red-stripe / Alu_mill.md
Last active November 22, 2019 06:50
Milling Aluminium on the TinyRobo CNC router
@red-stripe
red-stripe / socksProxy.sh
Created March 17, 2019 06:40
Quick and dirty socks5 proxy
#! /bin/bash
ssh -D 4000 -C -c 3des-cbc -f username@server.address.local -p 22 sleep 10; \
chromium --proxy-server=socks5://127.0.0.1:4000
# Quick and dirty socks5 proxy
# Compresses traffic ssh into host server and forks process to the background
# Opens chromium and configures it to use socks5 proxy on port 4000
# Process autocloses when chromium is closed
void MyFunct(char* buffer) {
void* myvoid; // a pointer to void can point to anything
char* b = new char[20]; // char array
myvoid = b; // memory address at myvoid is the same as at b
strcpy((char*)myvoid, "this is text"); // memory address at myvoid is 't'
std::cout << (char*)myvoid << '\n'; //print the string stored at myvoid
buffer = NULL; // set the buffer pointer to NULL
}
int main(int argc, char const *argv[]) {
Run the following commands:
grub rescue> ls (hd0,2)
Check that drive is ext# formated (ie the drive with ubuntu on it)
grub rescue> ls (hd0,2)/boot/
Check that terminal outputs boot files
grub rescue> set boot=(hd0,2)
grub rescue> set prefix=(hd0,2)/boot/grub
grub rescue> insmod normal
grub rescue> normal
@red-stripe
red-stripe / Git_rebase.md
Created February 13, 2018 04:59
Remove large files from solo projects

Removing large files from git

All commands are run from the root directory of your git project folder. Before you start make a backup of your entire git project elsewhere. My username is chobern, yours will be different. Unless you are future me....

Check the archive size, do you really have a problem? chobern$ du -sh .git

enable wired networking

sudo ifconfig eno1 up
sudo dhclient eno1
sudo nano /etc/resolv.conf
sudo nano /etc/network/interfaces
sudo service network-manager restart

Maybe a script to re-enable on logout?
/usr/local/bin/enable-network.sh

@red-stripe
red-stripe / bioplastic-noagar.md
Created September 27, 2017 20:28
Bio-plastic without agar

Ingredients

  • 300g H2O (room temp)
  • 15g glycerin (at 10% solution)
  • 30g cornflour

Method

Mix the cornflour with 40g of water to form a sticky paste.
In a pot and the rest of the water. Heat and combine until fully dissolved.

@red-stripe
red-stripe / bioplastic_woolmix
Created September 27, 2017 19:58
Bio-plastic wool mix
### Ingredients
- 330g H2O (room temp)
- 30g glycerin (at 10% solution)
- 30g guar gum
- 5g oil
- 3g agar
- 3g chopped wool
### Method