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 | |
# Ruby script to generate VICE monitor labels from | |
# an XAsm listing file. | |
filename = ARGV[0] | |
if filename | |
lines = File.readlines(filename) | |
else | |
abort "Usage: vice-labels.rb <filename>" |
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
#!/bin/bash | |
# | |
# Build and install the VICE emulator from source | |
# and then start the SuperPET 6809 mode emulation. | |
# | |
# Tested on Ubuntu 10.04 Desktop (x86) but likely | |
# works on other Debian-based systems. | |
set -x | |
set -e |
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
<?php | |
/** | |
* Trim unnecessary whitespace from an HTML file or ERB template. | |
* | |
* This is taken directly from Smarty 3.1.7 (http://www.smarty.net): | |
* libs/plugins.outfilter.trimwhitespace.php | |
* | |
* Changes: | |
* - Removed argument "Smarty_Internal_Template $smarty". |
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 Highlight Rails I18n Missing Translations | |
// @namespace http://mikenaberezny.com | |
// @description Highlight and console.log missing translations from Rails I18n. | |
// @include * | |
// ==/UserScript== | |
// Rails I18n wraps missing translations in <span class="translation_missing"> | |
var elements = document.getElementsByClassName("translation_missing"); |
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
DROP TRIGGER phpbb_config_insert_tpl_allow_php; | |
DROP TRIGGER phpbb_config_update_tpl_allow_php; | |
DELIMITER ;; | |
CREATE TRIGGER phpbb_config_insert_tpl_allow_php BEFORE INSERT ON phpbb_config FOR EACH ROW | |
IF (NEW.config_name = 'tpl_allow_php') THEN | |
SET NEW.config_value = 0; | |
SET NEW.is_dynamic = 0; | |
END IF;; |
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 'pp' | |
class PP | |
class CompactSingleLine < SingleLine | |
# output comma separators as "," instead of ", " to save bytes | |
def comma_breakable | |
text "," | |
end | |
end |
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
;READ | |
; Output secondary address on IEEE-488 bus | |
tksa: jsr txbyte | |
tkatn: lda #$3D | |
and tpi1_pa | |
; Output A on IEEE-488, switch data to input | |
setlns: sta tpi1_pa | |
lda #%11000011 ;PA7 NRFD Output |
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
# Patch Psych to only resolve classes required for RubyGems. Whitelist | |
# from: https://github.com/rubygems/rubygems.org/pull/516/files#L2R15 | |
require "yaml" | |
unless defined?(Psych) && Psych == YAML | |
abort "Psych is not the YAML parser so unable to patch" | |
end | |
module Psych |
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 | |
if ARGV[0] | |
filename = File.expand_path(ARGV[0]) | |
abort "File not found: #{filename}" unless File.file?(filename) | |
else | |
abort "Usage: #{__FILE__} <filename>" | |
end | |
`osascript -e 'tell application "0xED" to activate'` |
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
#!/bin/bash | |
# | |
# Build the MESS emulator from source and then | |
# start the SoftBox emulation. | |
# | |
# Tested on Ubuntu Desktop 16.04 (amd64) | |
set -x | |
set -e | |
set -o errexit |
OlderNewer