Skip to content

Instantly share code, notes, and snippets.

View coldnebo's full-sized avatar

Larry Kyrala coldnebo

View GitHub Profile
@coldnebo
coldnebo / negativefuel.md
Last active October 15, 2025 20:45
description of FSE negative fuel situation and steps to fix in MSFS 2024 for the Flysimware LearJet 35A

We start out our MSFS 2024 flight in the LearJet 35a going from KFNT to KAMN. Since it's a short flight (47 nm) we'll cruise at 8000, averaging 200-250 knots.

View the spreadsheet calculations for this analysis.

First Leg KFNT -> KAMN

First, we load the jet in FSE, 50% fuel, 467 gal.

fse-lear-release-fuel
@coldnebo
coldnebo / rails_trace.rb
Last active August 15, 2024 15:15
This Rack middleware for Rails3 lets you see a call-trace of the lines of ruby code in your application invoked during a single request. Only code within your app is considered (i.e. in the /app folder). This expands on my previous attempt (https://gist.github.com/3077744). Example of output in comments below.
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:
@coldnebo
coldnebo / minecraft-sethd.ps1
Created August 16, 2011 02:39
win7 powershell script to automatically resize a minecraft window for 1280x720 HD fraps recording.
# 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
@coldnebo
coldnebo / subl.sh
Last active August 3, 2020 14:05
modification of Sublime Text 3 /usr/bin/subl script to auto-open implict project directories
#!/bin/sh
have_project=false
implicit_project_file=false
for arg in $@; do
if [ $arg = "--project" ]; then
have_project=true
break
fi
done
@coldnebo
coldnebo / Default (Linux).sublime-keymap
Created August 10, 2011 23:20
simple scripts to prettify your xml and json in sublime text 2
[
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" },
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" }
]
@coldnebo
coldnebo / logic_init.sqf
Last active March 24, 2020 11:09
clearcut script to clear foliage from markers in Arma3 on Tanoa.
/*
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.
@coldnebo
coldnebo / Default (OSX).sublime-keymap -- User
Created February 3, 2012 16:21
Sublime Text 2 fix for OSX home/end keys
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} }
@coldnebo
coldnebo / lkdebug.rb
Created December 20, 2018 19:01
rails debug helper for tracking mutating state across contexts
# 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.
@coldnebo
coldnebo / boolean_function.rb
Created October 12, 2018 22:02
playing around with recomposing predicates.
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
@coldnebo
coldnebo / database.yml
Created October 11, 2018 16:05
description of our Rails multi-database configuration for @eileencodes
---
# 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