Skip to content

Instantly share code, notes, and snippets.


Joel Bradshaw cincodenada

View GitHub Profile
cincodenada / demo.js
Last active Sep 27, 2021
A version of my Bull demo script that attempts to clear jobs during their run, used to demonstrate bug #2167
View demo.js
const Queue = require('bull')
const delay = require('delay')
const shouldReAdd = process.argv.includes('--readd')
const timelog = (...args) => { console.log(, ...args) }
;(async () => {
timelog('Creating queue')
const queue = new Queue('example')
View controllers.application\.js
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
checkReadOnly = false;
appName = 'Ember Twiddle';
View controllers.application\.js
import Controller from '@ember/controller';
export default Controller.extend({})
View controllers.application\.js
import Controller from '@ember/controller';
const BaseController = Controller.extend({
actions: {
nameAlert: function(person){
window.alert('alert from BaseController: ' + person.lastName + ', ' + person.firstName);
cincodenada /
Last active Nov 21, 2020
A test script to fix old migrations in Bookwyrm
set -e
function echo_header {
echo -e "\e[1m\e[4m\n$1\e[0m"
source .env
cincodenada /
Created Oct 3, 2018
A quick script to find words that are subsets of other words. Designed to find country names that contain other countries, but should be generally applicable.
import fileinput
import re
from collections import defaultdict
class Word:
def __init__(self, word):
self.word = word
self.allcaps = re.sub("[^A-Z]","",word.upper())
cincodenada /
Created Apr 7, 2017 — forked from pamelafox/
Geonames Python wrapper
import sys
import urllib
import urllib2
import json
import logging
class GeonamesError(Exception):
def __init__(self, status):
cincodenada /
Last active Feb 6, 2017
Patches Vagrant bug #7616
# Patches a Vagrant permissions-creating script that breaks assigning groups
# that don't have a matching user. See Vagrant bug #7616
# Thanks to @Jc-L for the patch
paths=( "/usr/share/vagrant/" "/opt/vagrant/embedded/gems/gems/vagrant-1.8.5/" )
for p in "${paths[@]}"; do
if [ -d "$p" ]; then

Copy/paste the following into the target for a bookmark:


cincodenada / tableizer.js
Last active Mar 13, 2016
Pulls arbitrary table data out into a TSV
View tableizer.js
trs = document.querySelectorAll('tr');, function(tr) {
if(tr.children.length > 2) {
return, function(td) {
return td.textContent.trim();
} else {
return null;