Skip to content

Instantly share code, notes, and snippets.

:electron:
Always hacking

Remy Sharp remy

:electron:
Always hacking
Block or report user

Report or block remy

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
@remy
remy / popular-from-google-analytics.js
Last active Jul 12, 2019
Generates a summary file of popular blog posts from my Google Analytics raw data
View popular-from-google-analytics.js
View mousehold.jquery.js
/**
* 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
View _headers
/remy
Content-type: text/plain
@remy
remy / README.md
Last active Dec 31, 2018
Source to bandersnatch easter egg
View README.md

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 Nov 29, 2018
A basic-ish HTML slide to image generator.
View html-slides.js
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
@remy
remy / .eslintrc.json
Created Aug 3, 2018
My minimum eslintrc file needed (env: node + es6) - requires global install of eslint modules…
View .eslintrc.json
{
"extends": "eslint:recommended",
"env": {
"node": true,
"es6": true
},
"rules": {
"no-console": 0
}
}
@remy
remy / _README.md
Last active Jul 25, 2018
User style sheet to put the README in the right place.
View _README.md

README first for github

Using a user style sheet extension, this CSS should give you enough targetting to put the README above the files, putting the important information in the right place.

I use uptight, by the late Chloe Weil, you can use what you want.

example

@remy
remy / config.next.js
Created Jul 18, 2018
How I get env values into next.js
View config.next.js
require('@remy/envy'); // similar to dotenv, but supports .env.production, .env.local, etc
const webpack = require('webpack');
module.exports = {
webpack: config => {
config.plugins.push(
new webpack.EnvironmentPlugin(
['SHOW_SPEAKER'] // array of indiviudal ENV values I want exposed
)
);
View data.json
{
"script": "http.js",
"ext": "json",
"ignore": [".git", "node_modules/**/node_modules"],
"watch": "watchPath"
}
View _head.js
// via @github.com/electricg
// remove next.js custom scripts ala https://github.com/zeit/next.js/issues/3155#issuecomment-338708632
import React from 'react';
import { Head } from 'next/document';
export default class MyHead extends Head {
render() {
const { head, styles } = this.context._documentProps;
return (
You can’t perform that action at this time.