Skip to content

Instantly share code, notes, and snippets.

View richcahill's full-sized avatar
🖍️
Design with code.

Rich Cahill richcahill

🖍️
Design with code.
View GitHub Profile
@ReidWilliams
ReidWilliams / sign.html
Last active February 7, 2022 17:01
Skeleton for signing a message with Metamask
<html>
<body>
<script type="module">
// Use a simple local http server like 'python3 -m http.server'
// Needs to liston on port 8000
// Janky, but I use a local copy of the Ethers libray to avoid CORS headaches
// https://cdn.ethers.io/lib/ethers-5.2.esm.min.js
// Ethers docs:
// https://docs.ethers.io/v5/getting-started/
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@hughrawlinson
hughrawlinson / spotify_platform_oauth.sh
Last active January 28, 2024 02:49
Authenticate and get an oauth token for your Spotify app from the command line
#!/bin/bash
# spotify_platform_oauth.sh
#
# A script to quickly and easily generate Spotify oauth tokens given a client
# id, secret, and scope. Will authenticate a user via the browser.
# The app must have "http://localhost:8082/' as a redirect_uri
# spotify_client_creds.json should contain a spotify client id and secret pair
@onevcat
onevcat / Jitouch-Restarter
Created February 15, 2016 04:14
This gist kill Jitouch and then restart it. It solves problems when using Jitouch with Magic Trackpad 2
pkill -f "Jitouch"
sleep 5
nohup ~/Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/Jitouch.app/Contents/MacOS/Jitouch > /dev/null 2>&1 &
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 22, 2024 11:45
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@RoelN
RoelN / gist:8e3e7ecda723dfdfa590
Created February 1, 2015 13:56
Create GSUB entries
#!/usr/bin/python
words = ['SEM',
'MVP',
'pop',
'DRM',
'ROI',
'DNA',
'SEO',
'flat',
@borlaym
borlaym / animals.json
Created December 15, 2014 13:38
Array of animal names
[
"Aardvark",
"Albatross",
"Alligator",
"Alpaca",
"Ant",
"Anteater",
"Antelope",
"Ape",
"Armadillo",
@alojzije
alojzije / connectHTMLelements_SVG.png
Last active March 24, 2024 19:36
Connect two elements / draw a path between two elements with SVG path (using jQuery)
connectHTMLelements_SVG.png
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@branneman
branneman / better-nodejs-require-paths.md
Last active April 8, 2024 00:22
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions