Skip to content

Instantly share code, notes, and snippets.

Jared Grippe deadlyicon

Block or report user

Report or block deadlyicon

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
@deadlyicon
deadlyicon / bash.sh
Created Jun 11, 2019
do this to stop Epic Games Launcher from starting at launch boot
View bash.sh
launchctl unload ~/Library/LaunchAgents/com.epicgames.launcher.plist
rm ~/Library/LaunchAgents/com.epicgames.launcher.plist
View 5e-spell-alernatives.js
#!/usr/bin/env node
const fs = require('fs')
const words = fs.readFileSync('/usr/share/dict/words').toString().split(/\n+/g)
const spells = ["Abi-Dalzim’s Horrid Wilting","Absorb Elements","Acid Splash","Aganazzar’s Scorcher","Aid","Alarm (Ritual)","Alter Self","Animal Friendship","Animal Messenger (Ritual)","Animal Shapes","Animate Dead","Animate Objects","Antilife Shell","Antimagic Field","Antipathy/Sympathy","Arcane Eye","Arcane Gate","Arcane Lock","Armor of Agathys","Arms of Hadar","Astral Projection","Augury (Ritual)","Aura of Life","Aura of Purity","Aura of Vitality","Awaken","Bane","Banishing Smite","Banishment","Barkskin","Beacon of Hope","Beast Bond","Beast Sense (Ritual)","Bestow Curse","Bigby’s Hand","Blade Barrier","Blade Ward","Bless","Blight","Blinding Smite","Blindness/Deafness","Blink","Blur","Bones of the Earth","Booming Blade","Branding Smite","Burning Hands","Call Lightning","Calm Emotions","Catapult","Catnap","Cause Fear","Ceremony (Ritual)","Chain Lightning","Chaos Bolt","Charm Monster",
@deadlyicon
deadlyicon / gists_modeling.sql
Last active May 11, 2019
Data modeling for gist clone service
View gists_modeling.sql
CREATE EXTENSION IF NOT EXISTS uuid-ossp;
CREATE TABLE IF NOT EXISTS users (
user_id uuid PRIMARY KEY DEFAULT uuid_generate_v1mc(),
email text UNIQUE,
password_hash text,
username text,
avatar_url text
);
View bears.js
alert('🏂');
alert('🏂');
alert('🏂');
alert('🏂');
@deadlyicon
deadlyicon / README.md
Last active May 17, 2018
A subclass of the Spec reporter that prints the details of a test failure as soon as it fails
View README.md

Customer Mocha Reporter

…that prints the details of the test failure error as soon as a test fails.

Why? I hate having to wait until my long test suite finishes to begin debugging why a test fails.

View cachedRequest.js
const doSomething = (uniqueThing) => {
if (doSomething.currentRequest[uniqueThing]) {
return doSomething.currentRequest[uniqueThing]
}
return doSomething.currentRequest[uniqueThing] = require(url, params)
.then(
response => {
delete doSomething.currentRequest
return response
@deadlyicon
deadlyicon / challenge.js
Created Oct 4, 2017
parallel HTTP requests with Promises
View challenge.js
const request = require('request-promise')
const getURL = (url) => {
console.log(`GET: ${url}`)
// request the URL as a GET requests
// parse the resonse using JSON.parse
}
const getPosts = () => {
return getURL('https://jsonplaceholder.typicode.com/posts')
View livetodolist.js
#!/usr/bin/env node
const fs = require('fs')
const Path = require('path')
const stateFilePath = Path.resolve(process.env.HOME, '.todo')
const command = process.argv[2]
const input = process.argv.slice(3).join(' ')
const getState = callback => {
View sorting.js
const numbers = [5,2,4,3,1]
const sorterA = (a,b) => {
if (a < b) return -1
if (b < a) return 1
return 0
}
const sorterB = (a,b) => {
if (a < b) return 1
View chai.haveDuplicates.js
/*
expect([1,2,3]).to.not.haveDuplicates()
expect([1,1,2,3]).to.haveDuplicates()
*/
chai.Assertion.addMethod('haveDuplicates', function() {
const array = Array.from(this._obj)
expect(array).to.be.an.instanceof(Array)
You can’t perform that action at this time.