This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Javascript snippet for when you accidentially move thousands of emails to the Zoho Mail Trash and want to restore them | |
* Zoho only lets you restore up to 300 at a time, you can't select all. | |
* | |
* This hacky javascript works around it. Open Zoho Mail and go into the Trash, open the console with CTRL-SHIFT-J | |
* paste this in, and then it will just sit there hitting the select-all checkbox and then the restore button for gogoCycleCount times | |
* to restore 50 emails at a time. Set the cycle count to however many emails you are restoring divided by 50. | |
* | |
* DO NOT TOUCH THE ZOHO MAIL WINDOW WHILE IT IS WORKING, no checks are made that it is in the Trash folder. | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# 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. | |
# PROTIP: | |
# sudo startx -display :1 -- :1 vt8 | |
# CTRL-ALT-F8 to switch to the new X session on VT8 and run `xhost +` in the terminal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Quick Dirty Patch for Recaptcha with Mootools 1.2 Compatability Layer | |
* | |
* Make sure that all your mootools core/more source is loaded before this | |
* fix is loaded. | |
* | |
* @author James Sleeman <james@gogo.co.nz> | |
* @see https://github.com/google/recaptcha/issues/374 | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Take an input step file and duplicate it along the X axis | |
# creating files named by the pattern | |
# | |
# Example: | |
# ./freecad-linear-pattern-step-wrl.py /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WiFi.h> | |
#include <HTTPClient.h> | |
const String ssid = "PUT_YOUR_WIFI_NAME_HERE"; | |
const String password = "PUT_YOUR_WIFI_PASS_HERE"; | |
HTTPClient http; | |
String url = "http://sparks.gogo.co.nz/esp32/hello.html"; | |
void setup() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Kludgy script for fillling out a Superbuy Forwarding Order | |
* From LCSC Cart export | |
* | |
* Add stuff to your LCSC cart, export the cart (don't purchase yet) | |
* open the export in spreadsheet, add column 1 for type | |
* in column one record, for example "Capacitors", "Diodes", | |
* "Inductors"... | |
* | |
* Ensure that all parts have Customer # from BOM | |
* (set it to LCSC if none) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$Pronto = "0000 006d 0022 0002 0155 00ab 0015 0015 0015 0015 0015 0015 0015 0040 0015 0040 0015 0040 0015 0015 0015 0040 0015 0040 0015 0040 0015 0040 0015 0015 0015 0015 0015 0015 0015 0040 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0015 0015 0040 0015 0040 0015 0040 0015 0040 0015 0040 0015 0040 0015 0015 0015 0040 0015 0015 0015 0015 0015 05ea 0155 0055 0015 0e3d"; | |
$Pronto = preg_split('/ /', $Pronto); | |
// Remove header | |
array_shift($Pronto); | |
array_shift($Pronto); | |
array_shift($Pronto); | |
array_shift($Pronto); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
/* Yes this is terribly cobbled togethor, no there are no tests, it does what it needs to do, | |
which is to allow you to dump a bind format zonefile over the WHM API, and to update a | |
WHM domain from a bind zonefile, over the API, so you only need usual WHM access, resellers are fine. */ | |
if(count($argv) < 2) | |
{ | |
echo "\nBind To/From WHM API, Especially For Resellers\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Collapse Order History on Aliexpress and highlight time remaining for orders awaiting delivery. | |
// @namespace https://gist.github.com/sleemanj/352f095f6f67564dae825f79204f1f01 | |
// @updateURL https://gist.github.com/sleemanj/352f095f6f67564dae825f79204f1f01/raw/aliexpress-order-list-collapse.js | |
// @downloadURL https://gist.github.com/sleemanj/352f095f6f67564dae825f79204f1f01/raw/aliexpress-order-list-collapse.js | |
// @version 1.2 | |
// @description Collapse the orders in My Orders to make the page more compact, highlight "Awaiting Delivery" ones. | |
// @author James Sleeman | |
// @match *://trade.aliexpress.com/orderList.htm* | |
// @grant GM_addStyle |
NewerOlder