Skip to content

Instantly share code, notes, and snippets.

View jake-walker's full-sized avatar

Jake Walker jake-walker

View GitHub Profile
@jake-walker
jake-walker / microbit-messenger.py
Last active September 24, 2016 10:34
A simple BBC Micro:bit script that allows you to send radio messages to another Micro:bit that is running this same script
from microbit import *
import radio
# --- CONFIG ---
# Deadzone
deadzone = 350
# Scroll Speed (ms)
scrollspeed = 500
current = 1
@jake-walker
jake-walker / bootstrapv4-marked.js
Last active December 10, 2016 12:25
An adaption of marked.js to look nicer in Bootstrap 4.
/**
* marked - a markdown parser
* Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
* https://github.com/chjj/marked
*/
;(function() {
/**
* Block-Level Grammar
@jake-walker
jake-walker / vh7-api-reference.md
Created February 18, 2017 16:29
VH7 API Reference

VH7 API Reference

The root URL for the api is https://vh7.uk/api/

GET: /new/:URL

Generate a new short URL for the given URL.

Success Response Body:

{
@jake-walker
jake-walker / file
Created February 19, 2017 09:14
freedom_public
{"0.314331492625316":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMEcO7ns+nsLSpmAZ9Rq8J3Mp+NAMOb5yVt\r\nASxzfQmzzBzXiiD0iCbl/8Eo2d9fCpuGJpheznQtjhLSrx4Ajpg96s3/AAAACDxn\r\naXRodWI+wv8AAACOBBATCABA/wAAAAWCWKlh+/8AAAACiwn/AAAACZA59JOODU24\r\nRf8AAAAFlQgJCgv/AAAABJYDAQL/AAAAApsD/wAAAAKeAQAAqnkBALVcOC3pqLOu\r\njrMSrteAxO4jrXJQXAm13gHTqYdFs8sNAP9Q0M2BQvCJFUw2K9cIqIesoBKhe+9U\r\n12kW7UstFvr91M7/AAAAVgQAAAAAEggqhkjOPQMBBwIDBAfyPsIpE1C5Yo9XbBZ6\r\njY7WiEtL60pjnethFuFp4XyPR5UoV4d6LksOyWlyjD5KYg4khlgFjgVLBWEe5DYD\r\nUn8DAQgHwv8AAABtBBgTCAAf/wAAAAWCWKlh+/8AAAAJkDn0k44NTbhF/wAAAAKb\r\nDAAA+1MA/1wimkTf8i2+t2wlZWL+VHbtvPXd42YC1/Tlza+AWLKPAP98eQj0e653\r\nPLpuNFCzg1GndA2FSXraJyb2D6PIpjd1pg==\r\n=MFCJ\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n"}
import tkinter
class Demo1:
def __init__(self, master):
self.master = master
self.frame = tkinter.Frame(self.master)
self.button1 = tkinter.Button(self.frame, text = 'New Window', width = 25, command = self.new_window)
self.button1.pack()
self.frame.pack()
@jake-walker
jake-walker / average.asm
Last active March 21, 2017 12:32
Little Man Computer Multiply, Devide and Average
LDA zero
STA iterations
STA total
STA tmp
STA count
looptop INP
BRZ startd
STA tmp
LDA total
ADD tmp
/* BASICS */
.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 300px;
color: black;
}
/* PADDING */
@jake-walker
jake-walker / simple test.py
Last active September 9, 2017 15:45
Bulb Pi Simple Test
import subprocess
# Variable for storing what LIRC remote to use
lirc_remote = "bulb"
# Dictionary to make the commands easy to read
commands = {
"on": "KEY_POWER",
"off": "KEY_POWER2",
"brightness up": "KEY_UP",
"brightness down": "KEY_DOWN",
@jake-walker
jake-walker / bulb.py
Last active September 9, 2017 16:02
Bulb Pi Web Interface
import subprocess
# Import flask
from flask import Flask, render_template, request
# Make a flask server
app = Flask(__name__)
# String to set LIRC Remote to use
lirc_remote = "bulb"
# Dictionary of available commands in a human readable way
name: cheat # you probably want to 'snapcraft register <name>'
version: '2.2.2' # just for humans, typically '1.2+git' or '1.3.2'
summary: cheat lets you to create and view interactive cheatsheets on the command-line. # 79 char long summary
description: |
cheat allows you to create and view interactive cheatsheets on the
command-line. It was designed to help remind *nix system administrators of
options for commands that they use frequently, but not frequently enough to
remember.
grade: stable # must be 'stable' to release into candidate/stable channels