Skip to content

Instantly share code, notes, and snippets.

View scissorsneedfoodtoo's full-sized avatar

Kristofer Koishigawa scissorsneedfoodtoo

View GitHub Profile
@scissorsneedfoodtoo
scissorsneedfoodtoo / bumpFiles.js
Last active April 11, 2019 13:34
Automatically create the next challenge files for freeCodeCamp's new curriculum
const fs = require('fs');
const rootDir = './';
const cssDir = './css/';
function bumpFile(dir) {
const files = fs.readdirSync(dir);
let lastFile;
for (let i = files.length - 1; i > 0; i--) {
const file = files[i];
@scissorsneedfoodtoo
scissorsneedfoodtoo / pr.md
Created January 23, 2019 23:43 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@scissorsneedfoodtoo
scissorsneedfoodtoo / disable middle click paste in linux.md
Created January 17, 2019 11:05 — forked from sam0x17/disable middle click paste in linux.md
disable middle-click paste in linux without disabling middle scroll

Disable middle-click paste in Linux

Install packages:

sudo apt-get install xbindkeys xsel xdotool

Create xbindkey configuration file:

# ~/.xbindkeysrc
var denom = [
{ name: 'ONE HUNDRED', val: 100 },
{ name: 'TWENTY', val: 20 },
{ name: 'TEN', val: 10 },
{ name: 'FIVE', val: 5 },
{ name: 'ONE', val: 1 },
{ name: 'QUARTER', val: 0.25 },
{ name: 'DIME', val: 0.1 },
{ name: 'NICKEL', val: 0.05 },
{ name: 'PENNY', val: 0.01 },