Skip to content

Instantly share code, notes, and snippets.

View RealOrangeOne's full-sized avatar
🧑‍💻
What's happening?

Jake Howard RealOrangeOne

🧑‍💻
What's happening?
View GitHub Profile
@RealOrangeOne
RealOrangeOne / run.sh
Created July 9, 2023 11:19
Script to test connected webcams
#!/usr/bin/env bash
set -e
# Remove annoyingly verbose logging from OpenCV
export OPENCV_LOG_LEVEL=FATAL
python3 ./webcam_test.py
@RealOrangeOne
RealOrangeOne / keybase.md
Created September 9, 2017 13:10
Keybase Proof

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@RealOrangeOne
RealOrangeOne / README.md
Last active February 23, 2024 11:27
Trello JSON parser

Trello Parser

Download

Open a terminal, run this:

sudo curl https://gist.githubusercontent.com/RealOrangeOne/c35751ee794e90df512bdfba6f22574d/raw/trello-parser.py -o /usr/bin/trelloparse && sudo chmod +x /usr/bin/trelloparse

Usage

$ trelloparse -h

usage: tp [-h] input output

@RealOrangeOne
RealOrangeOne / astrill-extractor.py
Last active July 19, 2016 19:17
Extract certtificates and keys from astrill OVPN files. Should work for others
import os, shutil
from glob import glob
def write_file(data, out_file_name, new_dir):
with open(os.path.join(new_dir, out_file_name), 'w') as f:
f.write(''.join(data))
for ovpn_file in glob('*.ovpn'):
new_dir = os.path.join(ovpn_file.replace('.ovpn', ''))

Atom Sync-Settings

Settings for atom are now stored in the gist at https://gist.github.com/RealOrangeOne/9f9a4dd799ad01aa0502a09f06cbf454/ and synced using this plugin.

This makes syncing them between machines far easier than my old implementation of Owncloud sync and symlinks!

There's a lot of revisions on this gist!

Unfortunately, this setup also stores the version number of the plugins, which means that a revision has to be made every time a package needs to be updated. It does kindof annoy me with all the spam, but at least it's not really obvious, and I'm sure there's a way of cleaning it up!

@RealOrangeOne
RealOrangeOne / transition.js
Created December 25, 2015 20:07
Hex colour code transition algorithm. Convert to .ino later!
var element = $('div');
const original = "ff7f00";
const final = "333333";
var R = original.substring(0, 2);
var G = original.substring(2, 4);
var B = original.substring(4, 6);
console.log(R, G, B);
var finalR = final.substring(0, 2);
var finalG = final.substring(2, 4);
@RealOrangeOne
RealOrangeOne / serial.ino
Created December 24, 2015 23:47
Arduino Multi-character serial reader with check for command input
const char endChar = '\n';
const char commandIdent = '$';
String inputString;
boolean hasInput = false;
boolean isCommand = false;
void setup() {
Serial.begin(9600);
}
@RealOrangeOne
RealOrangeOne / Pi Time Lapse.py
Last active October 28, 2015 00:23
Raspberry Pi time lapse program. Keeps images in order without timestamp
# Using library at http://pimylifeup.com/raspberry-pi-time-lapse/
from glob import glob
import os.path
import subprocess, logging
FILE_PATH = "/home/pi/timelapse/" # Where to store the files
CAPTURE_COMMAND = "raspistill -o {0}" # To be formatted later with file name
FORMAT = "[%(levelname)s] %(message)s"
LOG_FILE = FILE_PATH + "log.txt"
@RealOrangeOne
RealOrangeOne / morse_code_decoder.json
Created September 20, 2015 14:17
Convert text to morse code (and visa versa)
{
" ":" ",
"'":".----.",
"(":"-.--.-",
")":"-.--.-",
",":"--..--",
"-":"-....-",
".":".-.-.-",
"/":"-..-.",
"0":"-----",