This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A very simple Badger script which displays a counter and allows you to increment/decrement it with the up/down buttons | |
import badger2040 | |
badger = badger2040.Badger2040() | |
display = badger.display | |
display.set_update_speed(badger2040.UPDATE_FAST) | |
number = 0 | |
def clear(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image | |
images/podia-logo.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CharacterFrequency | |
include Enumerable | |
# Take an AR collection and a block to extract the attribute value | |
def initialize collection, &block | |
@collection = collection | |
@block = block | |
end | |
def print |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails.application.eager_load! | |
class ActiveRecordDependancyGraph | |
include TSort | |
attr_reader :graph | |
def initialize root_model | |
@graph = {} | |
@model = root_model | |
fetch_children @model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Translate Amazon | |
// @namespace http://your.homepage/ | |
// @version 0.1 | |
// @description Translate the Amazon service names into plain English. See https://www.expeditedssl.com/aws-in-plain-english | |
// @author @ideasasylum | |
// @match https://*.console.aws.amazon.com/console/home?* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
spec_hits = [] | |
checks = { | |
'_spec\.rb$' => ['focus:[:space:]*true'], | |
'\.rb$' => ['binding\.pry', 'debugger'] | |
} | |
# Find the names of all the filenames that have been (A)dded (C)opied or (M)odified | |
filenames = `git diff --cached --name-only --diff-filter=ACM`.split("\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Translate Amazon | |
// @namespace http://ideasasylum.com | |
// @version 0.1 | |
// @description Translate the Amazon service names into plain English. See https://www.expeditedssl.com/aws-in-plain-english | |
// @author @ideasasylum | |
// @match https://*.console.aws.amazon.com/console/home?* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Daft House Prices | |
// @namespace http://ideasasylum.com | |
// @version 0.2 | |
// @description Replace Daft house prices with CB deposit and income limits | |
// @author Jamie Lawrence @ideasasylum | |
// @match https://www.daft.ie/* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open3' | |
require 'rainbow' | |
desc "Upgrade gems" | |
namespace :upgrade do | |
desc "Find a random gem to update" | |
task :bingo => :environment do | |
cmd = 'bundle outdated' | |
stdout, stderr, status = Open3.capture3(cmd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// originally found in a comment on: http://www.secretgeek.net/trello_ws | |
var s = []; | |
s.push("# " + jQuery(".board-header").children()[0].innerText); | |
jQuery(".list:has(.list-header-name)").each(function() { | |
s.push("\n## " + jQuery(this).find(".list-header-name")[0].innerText + "\n"); | |
jQuery(this).find(".list-card-title").each(function() { | |
s.push("* " + this.innerText); | |
}); | |
}); |
NewerOlder