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
View benchmark_example.js
#!/usr/bin/env node
function sortSortedWithArrayManipulation(a, b){
a = [...a]
b = [...b]
const sorted = []
while (a.length || b.length){
if (a.length === 0){
sorted.push(...b)
break
@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 / knapsack_amend.rb
Created Apr 11, 2016
# Monkey Patch Knapsack to merge reports instead of overwrite
View knapsack_amend.rb
# Monkey Patch Knapsack to merge reports instead of overwrite
begin
class Knapsack::Report
alias_method :save_without_leading_existing_report, :save
def save
Knapsack::Presenter.existing_report = open
save_without_leading_existing_report
end
end
@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('🏂');
View better_sprockets_coffee_script_syntax_errors.rb
class << Sprockets::CoffeeScriptProcessor
SYNTAX_ERROR_MESSAGE = /SyntaxError: \[stdin\]:(\d+):(\d+)/
def call_with_better_errors(input)
call_without_better_errors(input)
rescue ExecJS::RuntimeError => error
raise error unless error.message.match(SYNTAX_ERROR_MESSAGE)
line, col = $1, $2
message = "SyntaxError: #{input[:filename]}:#{line}:#{col}"
message += "\n\n#{add_line_numbers(input[:data])}"
@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 git-branch-details
#!/usr/bin/env ruby
require 'time'
require 'colored'
require 'parallel'
require 'optparse'
require 'facter'
require 'json'
require 'active_support/core_ext/numeric/time'
# require 'pry-byebug'
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
You can’t perform that action at this time.