Skip to content

Instantly share code, notes, and snippets.

View Narnach's full-sized avatar

Wes Oldenbeuving Narnach

View GitHub Profile
# If you have one or two monkey patches, you can easily stick them in an initializer, like this:
# ./config/initializers/monkey_patch_*.rb
# Or if you have some sort of load order requirement, prepend numbers to put them before other initializers:
# ./config/initializers/000_monkey_patch_*.rb
# If you have a lot, you might want to put them in ./app/monkey_patches or some other clearly marked location.
# Require the dependency to ensure it's loaded/available
require 'path/to/class/we/patch' # TODO
# TODO: Describe the problem this monkey patch solves. If possible refer to issue threads, PRs and commits with more details.

As of May 2018, this is the gear in my recording setup. I built this system in late 2014 and it was relatively state of the art back then. Over the years a few things have been added (VR headset, extra screen) but the core is relatively good even for today's games. That said, I will probably replace this somewhere during 2018 with the next generation of hardware. Stay tuned :-D

  • CPU: Intel i7 4790K @ 4.0 Ghz
  • CPU cooler: Corsair Hydro H80i (closed loop water cooler)
  • GPU: 2x ATI Strix GTX 980 graphics cards
  • Mainboard: Asus Maximus VII Hero Z97
  • Memory: 16GB Kingston HyperX Beast DDR3
  • Storage: 2x Kingston HyperX 3K SSD 2.5" 240GB + 1x Western Digital Blue WD10EZEX 1TB
  • PSU: Toughpower Grand 1050W ATX2
  • Case: Aerocool XPredator X3 Evil Black edition ATX

Keybase proof

I hereby claim:

  • I am narnach on github.
  • I am narnach ( on keybase.
  • I have a public key ASCzsSjEblHeiJSuCXrH0lTOnjjGis1I2uJsFh7ZduPzPQo

To claim this, I am signing this object:

# The regexp is re-compiled for every line in the file, which is SLOW
# If you are processing a lot of data, inline regexps are to be avoided!
class SlowWorker
def initialize(custom)
@custom = custom
def call(file),'r') do |file|
file.each_line do |line|
Narnach / get_mcc_mnc.rb
Last active August 29, 2015 14:26 — forked from choonkeat/get_mcc_mnc.rb
mcc mnc data from wikipedia
#!/usr/bin/env ruby
# Based on
# Not sure what the deal was with all that SSL stuff in there, but it was the cause content fetching did not work.
# Replaced it with plain old open-uri and it just works.
require 'net/https'
require 'open-uri'
require 'nokogiri'
require 'json'
Narnach /
Last active December 7, 2017 19:19
Path of Exile Loot Filter

Loot filters have moved!

This started as a single file, but it grew to three filters. Gists are meant to share single files, so it became kind of awkward to use this. Please check out the filters' new home at they are the same files, but it is now easier to pick the one that you want.

Narnach / gist:15b173f85fceace81112
Created January 27, 2015 15:12
Capistrano stats... WTF?
$ cap production deploy
DEBUG [26af543f] Running /usr/bin/env [ ! -d /usr/local/rbenv/versions/2.1.5 ] as
DEBUG [26af543f] Command: [ ! -d /usr/local/rbenv/versions/2.1.5 ]
DEBUG [26af543f] Finished in 1.506 seconds with exit status 1 (failed).
Would you like to enable statistics? Here is an example message we would
Do you want to enable statistics? (y/N):
Narnach / gist:ad9e4243f1799b273f4d
Created December 2, 2014 12:26
Rubymine 7.0.1 startup error
[ 2820] WARN - om.intellij.util.ProfilingUtil - YourKit controller initialization failed
java.lang.Exception: To profile application, you should run it with the profiler agent
at com.yourkit.api.Controller.getUsedPort(
at com.yourkit.api.Controller.<init>(
at com.intellij.util.ProfilingUtil.<clinit>(
at com.intellij.util.CaptureMemorySnapshotAction.update(
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(
at com.intellij.openapi.actionSystem.impl.Utils.a(
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(
# This is motivated/inspired by Avdi Grimm's post on Boolean Externalties
# In his post he asks the question: if a predicate returns false, why does it do so?
# If you chain a lot of predicates, it's hard to figure out why you get the answer you get. Consider this example:
# This implements some simple chained predicate logic to determine if the object is scary.
class SimpleBoo
def scary?