Skip to content

Instantly share code, notes, and snippets.

View remy's full-sized avatar
🌮
Hack. Learn. Fix. Teach.

Remy Sharp remy

🌮
Hack. Learn. Fix. Teach.
View GitHub Profile
@remy
remy / help.md
Created March 19, 2020 18:51
Rusty Pixel TileEditor.nex help

TileEditor

Common controls

CAPS+1 Map edit mode
CAPS+2 Block edit mode
CAPS+3 Palette edit mode
SYM+CAPS+L Load Set
@remy
remy / loader.bas
Created March 15, 2020 20:25
Loads screen$ and keeps it on screen (BASIC for ZX Spectrum)
10 CLS
20 LOAD "" SCREEN$
30 PAUSE 0
/* eslint-env browser */
/* global jq: true */
const escaped = new Map([['<', '&lt;'], ['>', '&gt;']]);
const $$ = s => Array.from(document.querySelectorAll(s));
const $ = s => document.querySelector(s);
let jqLoaded = false;
const scrollPositions = [];
@remy
remy / README.md
Created July 31, 2019 18:44
Workshop directions

This will configure your setup ready for the Next workshop:

  1. Create a working directory: mkdir next-workshop
  2. Go into the directory: cd next-workshop
  3. Save the package.json file (included in this gist) to the working directory and save it as "package.json"
  4. Assuming you've installed Node and also have npm, run npm install
@remy
remy / .eslintrc.json
Last active January 21, 2021 17:07
eslint config for browser and module support
{
"env": {
"es6": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:jsdoc/recommended"],
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"ecmaFeatures": {
@remy
remy / popular-from-google-analytics.js
Last active October 6, 2024 09:02
Generates a summary file of popular blog posts from my Google Analytics raw data
/**
* jQuery mousehold plugin - fires an event while the mouse is clicked down.
* Additionally, the function, when executed, is passed a single
* argument representing the count of times the event has been fired during
* this session of the mouse hold.
*
* @author Remy Sharp (leftlogic.com)
* @date 2006-12-15
* @example $("img").mousehold(200, function(i){ })
* @desc Repeats firing the passed function while the mouse is clicked down
/remy
Content-type: text/plain
@remy
remy / README.md
Last active December 31, 2018 11:36
Source to bandersnatch easter egg

See files below.

Note that the .tap file is corrupted - I've done an incomplete job of encoding, but the bytes are accurate to the demodulation process.

You can see the hidden easter egg in the decoded .tap file that reads "bigger digger bigger bee" - which apparently could be a reference to the authors ZX demo here

@remy
remy / html-slides.js
Last active November 29, 2018 09:54
A basic-ish HTML slide to image generator.
const puppeteer = require('puppeteer');
const content = `
/* this injected CSS allows me to hide elememts on the page */
`;
const total = 142; // total number of slides
// pages is an array of numbers, unless you need
// a single page, which can be passed through on