Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jackm
jackm / kijiji_repost_ad.user.js
Last active January 19, 2018 11:58
Greasemonkey/Tampermonkey script for easy ad re-posting on Kijiji.ca - NOTE: This script is broken as of Nov 2016, it no longer works with Kijiji
// ==UserScript==
// @name Kijiji Repost Ad
// @namespace KijijiScripts
// @version 0.4
// @description Allows for easy ad reposting on Kijiji when managing your ads. A new link named "Repost Ad" will appear in the ad manage widget. Clicking it will redirect the page to the new ad page with most form field pre-filled. You can also specifiy a different category ID in the text field beside the "Repost Ad" button if you wish to repost to a different category than before. Note that this script assumes that you have a Kijiji account and are already logged in and able to manage your existing ads. Also note that when reposting the ad, you will have to manually upload the ad images again, as these are not saved or carried forward automatically (sorry!). Reposting an ad in this way actually creates a whole new ad, so you should delete your old ad as well.
// @match http://www.kijiji.ca/v-view-details.html?*
// @match https://www.kijiji.ca/v-view-details.html?*
// @match http://www
@jackm
jackm / kijiji_show_cat_id.user.js
Last active January 22, 2018 04:01
Greasemonkey/Tampermonkey script to show hidden cateogry IDs on Kijiji.ca
// ==UserScript==
// @name Kijiji show category ID
// @namespace KijijiScripts
// @version 0.5
// @description Add an indicator to show decoded location IDs and category IDs in the breadcrumb nav list (not normally visible)
// @match https://www.kijiji.ca/*
// @grant none
// ==/UserScript==
(function() {
@jackm
jackm / timeStamp.js
Created January 12, 2016 20:41
Javascript function for a human readable timestamp in ISO8601 format
// Human readable timestamp in ISO8601 format
function timeStamp() {
var now = new Date();
var date = [now.getFullYear(), now.getMonth() + 1, now.getDate()];
var time = [now.getHours(), now.getMinutes(), now.getSeconds()];
// Prefix a zero to month and day
date[1] = ("00" + date[1]).slice(-2);
date[2] = ("00" + date[2]).slice(-2);
@jackm
jackm / kijiji_repost_ad_simple.user.js
Last active July 31, 2017 03:27
Greasemonkey/Tampermonkey script for simple ad re-posting on Kijiji.ca
// ==UserScript==
// @name Kijiji Repost Ad Simple
// @namespace KijijiScripts
// @version 0.3.1
// @description Allows for easy and free ad reposting on Kijiji when managing your ads. A new link named "Repost Ad" will appear in the ad manage widget as well as on the My Kijiji page for each ad.
// @match http://www.kijiji.ca/v-view-details.html?*
// @match https://www.kijiji.ca/v-view-details.html?*
// @match https://www.kijiji.ca/m-my-ads.html*
// @grant none
// ==/UserScript==
@jackm
jackm / Disable auto scrolling.js
Created July 19, 2017 16:02
Disable auto scrolling userscript
// ==UserScript==
// @name Disable auto scrolling
// @version 1.0
// @description Disables auto scrolling on pages (ie. middle mouse scrolling)
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
@jackm
jackm / unit4_interface.user.js
Last active November 13, 2018 16:42
Greasemonkey/Tampermonkey userscript for various interface improvements to Unit4
// ==UserScript==
// @name Unit4 interface improvements
// @namespace https://ubw.unit4cloud.com
// @version 0.3
// @description Make the Unit4 interface more user friendly and less painful to enter information
// @match https://ubw.unit4cloud.com/*
// @grant none
// ==/UserScript==
(function() {
@jackm
jackm / vpn.sh
Last active September 16, 2018 19:14
Wrapper script for managing connection to a VPN server using openconnect
#!/bin/bash
# Connect to a VPN server using openconnect
prog_name=$(basename $0)
pid_file="/var/run/openconnect"
default_server="https://vpn.example.com/"
help () {
echo "Usage: $prog_name [-c server] [-d]"
@jackm
jackm / can-packages-and-tools.md
Last active April 23, 2024 03:39
Collection of CAN bus packages and tools

Collection of CAN bus packages and tools

This document assumes the use of Linux as the chosen development platform. Items in bold are highly recommended.

It is recommended to use SocketCAN when working with CAN bus on Linux. It is supported by the Linux kernel mainline and follows the Linux interface model, allowing you to use other network tools such as Wireshark. This also allows the creation of virtual CAN interfaces where no physical hardware is required to simulate or replay CAN messages.