Skip to content

Instantly share code, notes, and snippets.

View bear454's full-sized avatar

James Mason bear454

View GitHub Profile
@bear454
bear454 / README.md
Created February 14, 2020 18:27
Terraform "Hello, World" app

I needed an exceptionally simple terraform script with no external dependencies, but a variable input... and everything I found during a minute of Googling was overkill. So... "Hello, World." it is.

This is a great test script for blue-horizon.

@bear454
bear454 / menlo.html
Created October 14, 2013 21:55
'Menlo' font not triggering non-monospaced render on Chrome/Android.
<!doctype html>
<html>
<head>
<style>
.monospace {
font-family: Menlo, Monaco, "Droid Sans Mono", Consolas, "Lucida Console", "Courier New", monospace;
}
.monospace_without_menlo {
font-family: Monaco, "Droid Sans Mono", Consolas, "Lucida Console", "Courier New", monospace;
# ~/bin/git-resync-fork
# assumes you have the upstream project as a git remote named 'upstream'
git checkout master
git fetch upstream master
git reset --hard upstream/master
git push --force
@bear454
bear454 / PS1
Created January 11, 2016 20:05
My bash prompt
#!/bin/bash
# Configure Colors:
# Reset
Color_Off='\[\e[0m\]' # Text Reset
# Regular Colors
Black='\[\e[0;30m\]' # Black
Red='\[\e[0;31m\]' # Red
Green='\[\e[0;32m\]' # Green
1
00:00:00,000 --> 00:00:00,800
Gravel.
2
00:00:00,900 --> 00:00:01,900
WARNING UNEXPECTED TAKEOFF
3
00:00:02,000 --> 00:00:04,000
@bear454
bear454 / gnome-music-all-albums.patch
Last active December 26, 2015 03:58
Tell gnome-music to load *all my albums*.
diff --git a/gnomemusic/grilo.py b/gnomemusic/grilo.py
index 13d77f0..0d8983b 100644
--- a/gnomemusic/grilo.py
+++ b/gnomemusic/grilo.py
@@ -87,7 +87,7 @@ class Grilo(GObject.GObject):
def populate_artists(self, offset, callback):
self.populate_items(Query.ARTISTS, offset, callback)
- def populate_albums(self, offset, callback, count=50):
+ def populate_albums(self, offset, callback, count=-1):
@bear454
bear454 / tango_palette.css.sass
Created August 16, 2011 16:55
Tango Palette as SASS
//Tango Palette: http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines#Color_Palette
//Licensed as Public Domain
//SASS'd by James Mason (james.mason@suse.com)
//Butter
$light_butter: #fce94f
$butter: #edd400
$dark_butter: #c4a000
//Orange
@bear454
bear454 / custom_steps.rb
Created August 12, 2011 23:08
js events in cucumber+capybara+selenium-webdriver...
When /^(?:|I )double-click the card$/ do
snippet = <<-EOS
$(".card[data-id='1']").dblclick();
EOS
page.execute_script( snippet )
end
@bear454
bear454 / motorola_cliq2.mpi
Created July 29, 2011 21:19
media-player-info for Motorola CLIQ2 (MB611)
[Device]
Vendor=Motorola
Product=CLIQ2/MB611
AccessProtocol=storage
DeviceMatch=usb:22b8:41d9;
[Media]
OutputFormats=OutputFormats=audio/mpeg;audio/x-ms-wma;audio/3gpp;audio/mp4;audio/aac;audio/vnd.rn-realaudio;audio/x-midi;audio/x-wav;application/ogg
[storage]
Depends on the "xml-simple" and "net-http-digest_auth" gems...
For Rails 2:
config/environment.rb:
Rails::Initializer.run do |config|
...
config.gem "xml-simple", :lib => "xmlsimple"
config.gem "net-http-digest_auth", :lib => "net/http/digest_auth"