Skip to content

Instantly share code, notes, and snippets.

will wade willwade

Block or report user

Report or block willwade

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@willwade
willwade / imagereplace-qt.py
Last active Apr 17, 2019
Grid3 Image Replacer. Take a file like this one: https://www.dropbox.com/s/ik1u0nzp7n6zfu6/Original.gridset?dl=0 - and find some new images to replace in the zip file
View imagereplace-qt.py
# this reads grid 3 files. Finds image in one grid page and same one in another and replaces it with a new one
import zipfile
from google_images_download import google_images_download
import re
import os, shutil
from glob import glob
from sys import exit, argv, exc_info, stderr
from PyQt5.QtCore import pyqtSignal, Qt
@willwade
willwade / keyboardHook.py
Created Dec 18, 2018
convert all keypresses and turn to HEX codes ready for BLE / AT Commands
View keyboardHook.py
"""
Convert the pressed up/down key to the hexcode of all keys and send to BLE
"""
import sys
sys.path.append('..')
import keyboard
import warnings
import serial
import serial.tools.list_ports
View smallchat.html
<!DOCTYPE html>
<html>
<head>
<title>Smallchat Demo</title>
<meta name="generator" content="BBEdit 12.1" />
</head>
<body>
<script src="https://embed.small.chat/T031YM1BHG5NS2NFRP.js" async></script>
</body>
</html>
@willwade
willwade / Starter_Once_Upon_a_Time.txt
Last active Mar 22, 2019
Pasco Once Upon a Time story telling #pasco-trees
View Starter_Once_Upon_a_Time.txt
Once upon a time
There was once a frog<meta data-auditory-cue="once a Frog">
Who met a beautiful Prince<meta data-auditory-cue="met a prince">
The prince decided to take the frog to the
Zoo
When they got there they
Went for a walk
And whilst on the walk met a giraffe
The giraffe asked the prince if he could be eaten
No. Said the Prince
View restart-aacinfo.py
#!/usr/bin/env python
# virtualenv venv
# source venv/bin/activate
# pip install selenium
# cd venv/bin
# curl -O https://chromedriver.storage.googleapis.com/2.39/chromedriver_linux64.zip
# unzip chromedriver_linux64.zip
import re, urlparse
@willwade
willwade / PlainTextTreeExample.txt
Created Apr 30, 2018
PlainTextTreeExample.txt
View PlainTextTreeExample.txt
I have something to say
Quick Chat
more
finish
uh oh
i do
i don’t know
help
hurry up
wait a minute
@willwade
willwade / data.txt
Created Apr 15, 2018
Doby/Clever Dog Camera details
View data.txt
Connects to http://pingma.qq.com/mstat/report when you go to access a live view of an image.. See user-agent etc..
curl -H 'Host: pingma.qq.com' -H 'Content-Type: json' -H 'Accept: */*' -H 'Accept-Language: en-gb' -H 'User-Agent: Doby/3.1.11.1272 CFNetwork/897.15 Darwin/17.5.0' --data-binary "�w�
��w�#��@͓�C�ۦ��z���Nn;y�w�*l��!�����M:H#��iTU��ԉ��@�����f�t>
ε���S3��1��e��>���RU��9~��>����m]X�������8��v��=��7�d$��f(����>PW+��Ǘ�������X�=!�΅s-��[G�j�P�|Ҹ)�g���%�\A
��$�e�Ru��:=�������+^4g�\M��ԩC�t�
���N/�j$���nͪ20<" --compressed 'http://pingma.qq.com/mstat/report'
Data returned is like:
@willwade
willwade / MdToTxtIndent.rb
Created Mar 20, 2018
Brett Terpstra's "Markdown to Mindnmap" script. Takes any indented/mix list and outputs a non-formatted list
View MdToTxtIndent.rb
# encoding: utf-8
require 'shellwords'
if RUBY_VERSION.to_f > 1.9
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
input = STDIN.read.force_encoding('utf-8')
else
input = STDIN.read
end
@willwade
willwade / en-GB-Pragmatic_Phrases.txt
Created Mar 20, 2018
Example of a indented file
View en-GB-Pragmatic_Phrases.txt
I have something to say
Quick Chat
more
finish
uh oh
i do
i don’t know
help
hurry up
wait a minute
@willwade
willwade / convertToMD.js
Created Mar 14, 2018
Convert a site of HTML to Markdown
View convertToMD.js
// For Node.js
var TurndownService = require('turndown')
var fs = require('fs')
var path = require("path");
var turndownService = new TurndownService()
var Glob = require('Glob');
var pattern = "/Users/willwade/bin/dasher-site/static/dasher/*/*.html"
function convertHTMLtoMD(file,fileMD,fromN,fromEndFile){
fs.readFile(file, {encoding: 'utf-8'}, function(err,data){
You can’t perform that action at this time.