Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nzifnab's full-sized avatar

Nathan Benes nzifnab

  • Westin Consulting
  • Denver, CO
View GitHub Profile
@nzifnab
nzifnab / # postgresql@12 - 2020-12-01_13-50-05.txt
Created December 1, 2020 20:52
postgresql@12 on Ubuntu 20.04.1 LTS - Homebrew build logs
Homebrew build logs for postgresql@12 on Ubuntu 20.04.1 LTS
Build date: 2020-12-01 13:50:05
@nzifnab
nzifnab / # postgis - 2019-08-07_15-47-49.txt
Created August 7, 2019 21:59
postgis on Ubuntu 17.10 - Homebrew build logs
Homebrew build logs for postgis on Ubuntu 17.10
Build date: 2019-08-07 15:47:49
@nzifnab
nzifnab / databases.rake
Last active December 21, 2017 19:14
Rails PG-9.5 Fix
Rake::Task["db:structure:dump"].clear
namespace :db do
namespace :structure do
desc "Overriding the task db:structure:dump task to remove -i option from pg_dump to make postgres 9.5 compatible"
task :dump => [:environment, :load_config] do
config = current_config
filename = ENV['DB_STRUCTURE'] || File.join(Rails.root, "db", "structure.sql")
case config['adapter']
when /mysql/, 'oci', 'oracle'
ActiveRecord::Base.establish_connection(config)
@nzifnab
nzifnab / AB_Check.lua
Last active August 29, 2015 14:25 — forked from Choonster/BrandedStatus_1.lua
WA Code for missing AB...
function()
local unit = nil
local group_type = ""
local group_size = 0
if IsInRaid() then
group_type = "raid"
group_size = 40
elseif IsInGroup() then
group_type = "party"
@nzifnab
nzifnab / .htaccess
Created December 5, 2012 23:44
Force redirect 'html' and 'shtml' to use a non-extension url
RewriteEngine on
RewriteCond %{THE_REQUEST} /(.*)\.s?html
RewriteRule ^.*$ /%1 [R=301,L]
RewriteCond %{REQUEST_FILENAME}\.shtml -f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*/?[\w\d\-]+)$ $1.shtml [L]
@nzifnab
nzifnab / d3_stat_calculator.coffee
Last active October 11, 2015 01:08
Coffeescript for stat calculator
###
I don't advise trying to edit this file directly. This was coded using coffeescript.
Coffeescript source here: https://gist.github.com/3779098
###
`function onOpen(){}`
`function populateProfile(){}`
`function clearUpgradeFields(){}`
`function clearAllFields(){}`
`function spreadsheetName(){}`
start
declarations
arrFull_Deck [2,3,4,5,6,7,8,9,10,11,12,13,14, 2,3,4,5,6,7,8,9,10,11,12,13,14, 2,3,4,5,6,7,8,9,10,11,12,13,14, 2,3,4,5,6,7,8,9,10,11,12,13,14]
arrP1_hand [ ]
arrP2_hand [ ]
arrTable [ ]
num Full_DeckCardCount = 52
num Table = 0
num P1_CardValue
num P2_CardValue
start
declarations
arrFull_Deck [2,3,4,5,6,7,8,9,10,11,12,13,14, 2,3,4,5,6,7,8,9,10,11,12,13,14, 2,3,4,5,6,7,8,9,10,11,12,13,14, 2,3,4,5,6,7,8,9,10,11,12,13,14]
arrP1_hand [ ]
arrP2_hand [ ]
arrTable [ ]
num Full_DeckCardCount = 52
num Table = 0
num P1_CardValue
num P2_CardValue
@nzifnab
nzifnab / help.rb
Created June 28, 2011 17:53
helping stuff
# <-- This is a comment
# Array of cards:
arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# and the player's current hand:
my_hand = []
# In ruby it can also be written like this:
# arr = [1..10]
# Now let's get a random value from the array (deck of cards):
@nzifnab
nzifnab / who_called.rb
Created May 11, 2011 20:06
Who called me!
# file_1.rb
#-----------------------------
require 'file_2'
where_am_i()
#-----------------------------
# file_2.rb
#-----------------------------