Skip to content

Instantly share code, notes, and snippets.

Avatar

Timothy J. Raymond timraymond

View GitHub Profile
@timraymond
timraymond / weather.json
Created Apr 14, 2017
Grafana Dashboard for displaying weather information supplied by Weewx
View weather.json
{
"id": 1,
"title": "Wild View Weather",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"sharedCrosshair": false,
"rows": [
@timraymond
timraymond / gist:f41177fc8f12ed229332ed9283865729
Created Nov 11, 2020
A minimal test / build action for Go
View gist:f41177fc8f12ed229332ed9283865729
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
@timraymond
timraymond / userscalable_yes.txt
Last active Dec 31, 2015
Bookmarklet to re-enable zoom. Useful for sites that annoyingly set userscalable=no without actually optimizing their content for iOS display.
View userscalable_yes.txt
javascript:document.querySelector('meta%5Bname=viewport%5D').setAttribute('content','width=device-width,initial-scale=1.0,maximum-scale=10.0,user-scalable=1');
View btvconfnotes.md

Mark Bates - Keynote

Needs no introduction. Go watch it. It was an excellent introduction to the entire conference which many people that I talked to afterward enjoyed. I feel like people made an effort to be more outgoing in the hallway after watching his talk.

David Czerneki - Zero Downtime Deploys

View gist:2048025
Ext.define("app_namespace.model.model_name", {
extends: 'Ext.data.model',
config: {
fields: [
{ name: 'some_identifier', type: 'string' }
]}
})
Ext.define("app_namespace.store.store_name", {
@timraymond
timraymond / desopafy.js
Created Jan 18, 2012
Remove SOPA overlay from Wikipedia pages
View desopafy.js
$("#mw-page-base, #mw-head-base, #content, #mw-head, #mw-panel, #footer").css("display", "inherit");
$("#mw-sopaOverlay").css("display", "none");
@timraymond
timraymond / football.rb
Created Jun 16, 2015
Generates all possible football goal sequences leading to a score of 21
View football.rb
def football(results, trace, sum, roots, nodes)
results_p = results.dup
if sum < 0
return results_p
elsif sum == 0
return results_p << trace
else
nodes_p = nodes.dup
roots.each {|rt| nodes_p << rt } # push each root on the node stack
while r = nodes_p.pop
@timraymond
timraymond / replay.rb
Created Jun 9, 2015
Replay Heroku Logs
View replay.rb
require 'time'
require 'thread'
require 'uri'
require 'pry'
filename = ARGV.shift
if !filename
puts "Specify a filename"
exit(1)
@timraymond
timraymond / sum.rb
Created Jun 5, 2015
Possible expressions involving the digits 1-9 and operators "-" and "+"
View sum.rb
def expressions(nums)
first, second = nums.slice(0, nums.length/2), nums.slice(nums.length/2, nums.length)
if first == ""
return [second]
end
left_sub = expressions(first)
right_sub = expressions(second)
exprs = []
left_sub.each do |l|
right_sub.each do |r|
View ie9compatiblexhradapter.js
/**
* Connection class to use with the elasticsearch.js client for limited compatibility with
* IE 9 (also IE 8 is you include an es5 shim like https://github.com/es-shims/es5-shim).
*
* All connections from the browser, directly to elasticsearch, are assumed to be cross-domain
* and therefore suffer from a lack of support in legacy browsers. To prevent the client from
* behaving differently based on the browser version, the following limitations have been imposed
* on all requests:
*
* - only GET and POST are supported