Skip to content

Instantly share code, notes, and snippets.

lol wow woot sweet
cool amazing rofl lmao
### Keybase proof
I hereby claim:
* I am nTraum on github.
* I am ntraum (https://keybase.io/ntraum) on keybase.
* I have a public key whose fingerprint is EC7E 5253 AFF7 304A 7D4D 3D09 039F 7802 4453 2D1C
To claim this, I am signing this object:
'food​' == 'food'
@nTraum
nTraum / log.txt
Created January 29, 2015 11:31
rails_best_practices segfault Ruby 2.2
rake rails_best_practices
/Users/philipppress/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/code_analyzer-0.4.5/lib/code_analyzer/checking_visitor/default.rb:42: [BUG] Segmentation fault at 0x0000000002a2b0
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.3)
actionpack (= 4.0.3)
mail (~> 2.5.4)
actionpack (4.0.3)
activesupport (= 4.0.3)
builder (~> 3.1.0)
erubis (~> 2.7.0)
@nTraum
nTraum / gist:5782159
Last active December 18, 2015 12:19
fancyhdr exmaple
\pagestyle{fancy} % use fancyhdr for the following pages
\fancyhead{} % clear all header fields
\rhead{\rightmark} % section name for right side (header)
\renewcommand{\headrulewidth}{0.4pt} % thickness of header ruler
\fancyfoot{} % clear all footer fields
\renewcommand{\headrulewidth}{0pt} % no ruler for footer
%\chapter{Here goes your chapter}
@nTraum
nTraum / move_logs_stv_demos.rb
Last active December 14, 2015 08:59
A Ruby script that uses the steam-condenser gem to move stv demos and log files from a srcds to a remote location only when the gameserver is empty.
HOST = 'example.com'
PORT = 27015
RCON = 's3cr3t'
STV_SRC_DIR = '/servers/foo/orangebox/tf/demos/' #trailing slash necessary!
STV_DEST_DIR = '/var/www/bar/demos/'
STV_GLOB = '*.dem'
LOGS_SRC_DIR = '/servers/foo/orangebox/tf/logs/'
LOGS_DEST_DIR = '/var/www/bar/logs/'
@nTraum
nTraum / gist:3944523
Created October 24, 2012 07:17
initializers/omniauth.rb
require 'omniauth-openid'
require 'openid/store/filesystem'
Rails.application.config.middleware.use OmniAuth::Builder do
provider :steam, 'MYSTEAMWEBAPIKEY'
end
@nTraum
nTraum / gist:3408627
Created August 20, 2012 22:28
rubycon
require 'steam-condenser'
require 'readline'
Prompt = '> '
Completion_char = ' '
Cvarlist_cmd = 'cvarlist'
def get_for_server_info
address = "localhost"
#!/usr/bin/env perl
use v5.10;
use utf8;
use strict;
use warnings;
use autodie;
use File::Copy;
use Cwd;