Skip to content

Instantly share code, notes, and snippets.

James Sleeman sleemanj

Block or report user

Report or block sleemanj

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
sleemanj / aliexpress-order-list-collapse.js
Last active Nov 29, 2019
Tampermonkey Script to Collapse your Aliexpress "My Orders" page and highlight orders which are Awaiting Delivery based on days remaining, light blue more than 28 days remain, orange more than 7 days, RED less than 7 days.
View aliexpress-order-list-collapse.js
// ==UserScript==
// @name Collapse Order History on Aliexpress and highlight time remaining for orders awaiting delivery.
// @namespace
// @updateURL
// @downloadURL
// @version 1.2
// @description Collapse the orders in My Orders to make the page more compact, highlight "Awaiting Delivery" ones.
// @author James Sleeman
// @match *://*
// @grant GM_addStyle
sleemanj / asc-xml.php
Created Apr 17, 2017
Convert DipTrace .asc library Export Format into an XML structure, and back again.
View asc-xml.php
// Convert .asc into a .xml representation, or the reverse
// The attributes of each "asc" element '(Blah 123 "abc" )' are just dumped
// into _PARAMS="" attribute of the node '<Blah _PARAMS="123 &quot;abc&quot;" />'
// Take note that in the XML, _UNCLOSED="1" means that this tag
// when converted to asc must have the closing ")" on a separate line
// even if it is empty, not all do.
sleemanj /
Last active Jun 26, 2016
Use FreeCAD to take an input STEP file and create a series of files which contain a series of copies of that file. For example creating a series of PCB headers, your initial step file is a single pole of the header (or 2 poles in the case of a double row) and then it will create files for 1x2, 1x3, 1x4 and so forth.
# Take an input step file and duplicate it along the X axis
# creating files named by the pattern
# Example:
# ./ /tmp/hdr-1x1t_2.54.step "/tmp/hdr-1x%dt_2.54.wrl"
# Where "%d" will be replaced by the copy number...
# will generate hdr-1x1t_2.54.wrl
# hdr-1x2t_2.54.wrl
# Convert a step file (or other) into a wrl file (or other) with FreeCAD
# You must provide an absolute input and output file path (NO RELATIVE!)
# A freecad window will open, the conversion will happen, and it will
# close. The export requires gui functions it seems so this is unavoidable.
# sudo startx -display :1 -- :1 vt8
# CTRL-ALT-F8 to switch to the new X session on VT8 and run `xhost +` in the terminal
sleemanj /
Created May 29, 2016
Sigrok Timing Decoder with Frequency and Averaging
## This file is part of the libsigrokdecode project.
## Copyright (C) 2014 Torsten Duwe <>
## Copyright (C) 2014 Sebastien Bourdelin <>
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
sleemanj / max6675.ino
Created May 18, 2016
MAX6675 Thermocouple Reader Example Arduino Code
View max6675.ino
/** MAX6675 Thermocouple Reader Example Code
* This is so simple a library would be silly!
* 6675 Module ==> Arduino
* CS ==> D10
* SO ==> D12
* SCK ==> D13
* Vcc ==> Vcc (5v OK)
* Gnd ==> Gnd
sleemanj /
Last active Dec 18, 2017
Create image from gerbers with gerbv
# We need to "invert" the mask, this is dirty but seems to work, further testing required on larger sample set :)
echo "%IPNEG*%" > /tmp/newMask.gbr
cat "$MASK" | sed -r 's/%IP(POS|NEG)\*%//' >>/tmp/newMask.gbr
sleemanj / aliexpress-qty-search-fix.js
Last active Feb 21, 2019
Return the Quantity Search on Aliexpress
View aliexpress-qty-search-fix.js
// ==UserScript==
// @name Return the Quantity Search, Show Per Piece Pricing
// @namespace
// @updateURL
// @downloadURL
// @version 1.1
// @description Put the quantity search fields back into the search interface on Aliexpress when they are not present and add a per-piece pricing when possible on the listing pages.
// @author James Sleeman
// @match *://**
// @exclude *://*
sleemanj / eevblog-no-annoyance.user.js
Last active Oct 30, 2015
Remove Annoying EEVBlog Ad In Last Post
View eevblog-no-annoyance.user.js
// ==UserScript==
// @name EEVBlog Remove The Annoyance
// @namespace
// @updateURL
// @downloadURL
// @version 0.5
// @description Remove tha silly ad-containing post
// @match*
// @copyright 2015+, James Sleeman
// ==/UserScript==
You can’t perform that action at this time.