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
# Win7 Powershell script to resize Minecraft to 1280x720 (HD for fraps youtube capture) | |
# use by typing the following at a command prompt: | |
# > PowerShell -ExecutionPolicy Bypass -File minecraft-sethd.ps1 | |
# refs: | |
# http://stackoverflow.com/questions/2556872/how-to-set-foreground-window-from-powershell-event-subscriber-action | |
# http://richardspowershellblog.wordpress.com/2011/07/23/moving-windows/ | |
# http://www.suite101.com/content/client-area-size-with-movewindow-a17846 |
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/sh | |
have_project=false | |
implicit_project_file=false | |
for arg in $@; do | |
if [ $arg = "--project" ]; then | |
have_project=true | |
break | |
fi | |
done |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" }, | |
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" } | |
] |
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
/* | |
clearcut script to clear foliage from markers in Arma3 on Tanoa. | |
1. place this script in a Game Logic init | |
2. place one area marker (ELLIPSE/circle) named "cutter" and size it a=b in the EDEN editor | |
3. copy that marker to create as many clean-cut areas as you want | |
on startup, this script will automatically find any trees, small rocks fallen logs | |
within those markers and hide them. |
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
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} }, | |
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} } |
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
# debugging helper for tracing variable changes across contexts in legacy code. The context information such as file, line, | |
# class and method are automatically logged for you so you can focus on tracing the state mutations through various contexts | |
# with ease. | |
# @note this top-level method may be placed in config/initializers/lkdebug.rb and used anywhere | |
# @note this method does nothing outside of Rails.env.development | |
# @note legacy examples are intentionally bad code!! You should not write code like this, but if you have to debug code like this | |
# you may want to dump state from various contexts within the program to understand what is going on. | |
# | |
# @param annotation [String] text comment providing context for the log. |
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 'singleton' | |
# outputs a colored call-trace graph to the Rails logger of the lines of ruby code | |
# invoked during a single request. | |
# | |
# Example: | |
# | |
# 1) Make sure this file is loaded in an initializer | |
# | |
# 2) Add the following to your application.rb in Rails3: |
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 'csv' | |
class BooleanFunction | |
attr_reader :inputs, :input_values, :output, :output_values | |
BOOLEAN_SET = [true, false] | |
def initialize( inputs:, output: nil ) | |
raise ArgumentError, "inputs must be an Enumerable of symbols" if (!inputs.kind_of?(Enumerable) || !inputs.map{|e| e.is_a?(Symbol) }.reduce(:&)) | |
@output = 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
--- | |
# defaults for all envs (local/deployed), (nonprod/prod) | |
defaults: &defaults | |
encoding: utf8 | |
adapter: mysql2 | |
read_timeout: 10 | |
write_timeout: 10 | |
connect_timeout: 10 | |
reconnect: true |
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
declare -a arr=("violin1" "violin2" "viola" "cello" "bass") | |
for inst in "${arr[@]}" | |
do | |
#inst="violin2" | |
title="Souza - The Stars and Stripes Forever" | |
# create a blank letter page for titles |
NewerOlder