Skip to content

Instantly share code, notes, and snippets.

@markstinson
markstinson / readme.md
Created December 4, 2017 04:27 — forked from max-mapper/readme.md
How-to: Write a node module with voxel.js

Writing node modules with voxel.js

This is a short guide that will teach you the workflows that have been figured out by the voxel.js community for writing node modules + sharing them on NPM and Github. It is assumed that you have a basic understanding of JavaScript, github and the command line (if not you can check out an introduction to git and the command line or learn JS basics from JavaScript for Cats)

The voxel-tower repository on github contains all the example code from this guide.

Table of contents

@markstinson
markstinson / gog-notify.py
Created June 7, 2017 05:33 — forked from steevp/gog-notify.py
Checks for new GOG Connect games
#!/usr/bin/env python2
# Script to check for new GOG Connect games
#
# Configure your system for sending emails first. I used:
# https://www.howtoforge.com/tutorial/configure-postfix-to-use-gmail-as-a-mail-relay/
import requests
import browsercookie
import json
import smtplib
from email.mime.text import MIMEText
@markstinson
markstinson / waitForKeyElements.js
Created December 6, 2016 03:17 — forked from BrockA/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@markstinson
markstinson / indieroyalebundlehider.user.js
Created December 6, 2016 03:16 — forked from mikemanger/indieroyalebundlehider.user.js
Hides bundles you don't own from your Indie Royale collection page
// ==UserScript==
// @name Indie Royale Bundle Hider
// @description Hides bundles you don't own from your collection page
// @include http://www.indieroyale.com/collection
// @updateURL https://gist.githubusercontent.com/markstinson/21f5e313004795f34632d2ede10b2c5b/raw
// @downloadURL https://gist.githubusercontent.com/markstinson/21f5e313004795f34632d2ede10b2c5b/raw
// @grant none
// @version 1.1.1
// ==/UserScript==
@markstinson
markstinson / desura-game-labeler.user.js
Last active December 6, 2016 03:18 — forked from mikemanger/desura-game-labeler.user.js
Displays titles on your Desura collection page
// ==UserScript==
// @name Desura Game Labeler
// @include http://www.desura.com/collection
// @updateURL https://gist.githubusercontent.com/markstinson/60fc05a31360e177283253237fa4c59a/raw
// @downloadURL https://gist.githubusercontent.com/markstinson/60fc05a31360e177283253237fa4c59a/raw
// @require https://gist.githubusercontent.com/markstinson/cbe66b990811db3346caab8eb2b39ef8/raw
// @grant none
// @version 1.2.2
// ==/UserScript==
@markstinson
markstinson / humble-bundle-key-cache.user.js
Last active December 6, 2016 03:14 — forked from mikemanger/humble-bundle-key-cache.user.js
Caches your Humble bundle key list
// ==UserScript==
// @name Humble Bundle key cache
// @include https://www.humblebundle.com/home*
// @updateURL https://gist.githubusercontent.com/markstinson/eb377c2c21b3b14c5676d375f619bdad/raw
// @downloadURL https://gist.githubusercontent.com/markstinson/eb377c2c21b3b14c5676d375f619bdad/raw
// @grant GM_setValue
// @grant GM_getValue
// @run-at document-end
// @version 1.1.4
// ==/UserScript==
@markstinson
markstinson / indieroyale.user.js
Last active December 6, 2016 03:14 — forked from mikemanger/indieroyale.user.js
Indie Royal Collection Labeler
// ==UserScript==
// @name Indie Royale Bundle Labeler
// @include http://www.indieroyale.com/collection
// @updateURL https://gist.githubusercontent.com/markstinson/1606fa532246cb6d231d4719db03cebc/raw
// @downloadURL https://gist.githubusercontent.com/markstinson/1606fa532246cb6d231d4719db03cebc/raw
// @grant none
// @version 1.3.1
// ==/UserScript==
// update with your username/checksum

Keybase proof

I hereby claim:

  • I am markstinson on github.
  • I am markstinson (https://keybase.io/markstinson) on keybase.
  • I have a public key whose fingerprint is 4AE8 451E 2B14 EAC4 B438 9790 7664 0C31 58AC D8CB

To claim this, I am signing this object:

@markstinson
markstinson / learn.lua
Created August 14, 2016 06:55 — forked from tylerneylon/learn.lua
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------
@markstinson
markstinson / SftpServiceTest.java
Created April 6, 2016 01:01 — forked from ToastShaman/SftpServiceTest.java
Using an embedded Apache MINA SSHD server in a unit test to verify that your code is able to upload a file through SFTP. This unit tests uses JSch as the client to speak to an embedded Apache MINA sftp server and verifies that the upload of a text file was successful.
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;