Skip to content

Instantly share code, notes, and snippets.

@tsykoduk
tsykoduk / VikingCoders.md
Last active August 29, 2022 18:00
Viking Coders

Forward

I have been using the term "Viking Coder" for a several years now. Honestly, it was a "equal and opposite" reaction to the rise of the Rockstar Ninja Samurai whatever in job descriptions. I don't play a guitar or dress in black PJ's. I am a tall person, and I like big, simple solutions to problems. And I am least a little bit Scandinavian.

I wanted to open this up, so steal, pull, push away!

Thus the Viking Coder was born.

The Viking coder is also a response to many of the Agile practices out there. We mean to strip the nonessential bits of cruft away and expose the naked goodness of what we have learned over the last few decades.

@tsykoduk
tsykoduk / gist:a8430235b6ccde7a1b805ca61c836487
Created September 9, 2019 21:57 — forked from beanieboi/gist:ad526faf063181f336a2
Codeship Nginx Config for Heroku
daemon off;
# Heroku dynos have at least 4 cores.
worker_processes <%= ENV['NGINX_WORKERS'] || 4 %>;
events {
use epoll;
accept_mutex on;
worker_connections 1024;
}
@tsykoduk
tsykoduk / apache_log_url_getter.sh
Created December 13, 2011 22:08
pull GET urls out of an apache log file
#!/usr/bin/env bash
# Use this script to pull just the POST URLs out of an apache log file
# Useful to replay traffic against test servers
cat $1 | tr -d - | cut -d\" -f2 | sed 's/GET //' | sed 's/ HTTP\/1.1//' | grep -v "POST" | grep -v '^$' >list.txt
@tsykoduk
tsykoduk / mac_env.md
Last active September 7, 2016 14:48

###Mac OSX Development/Admin Tools

0 - XCode

XCode, or at least the XCode command line extensions, are at the core of any development work that you are going to do on a Mac. You'll need to install it to get things like the C Complier and bootstrap the build environment. If you are going to be doing iOS or Mac OSX development, get the entire package from the App Store. If you are not, just install Homebrew, and it will prompt you to install the XCode CLI tools.

1 - Homebrew

OSX Unix Package Manager. The site is at brew.sh. You can use this to install things like Git, Ruby, Python, etc.

#!/usr/bin/env bash
#
# Supported Operating Systems:
#
# - Arch Linux
# - RedHat Based (CentOS, ...)
# - Debian Based (Ubuntu, ...)
#
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
~ ☯ whois dicemonkeys.com
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
Domain Name: DICEMONKEYS.COM
Registrar: GODADDY.COM, LLC
@tsykoduk
tsykoduk / FixSkype.sh
Last active December 19, 2015 16:48
This script will fix the "There is another version of Skype running" error with out forcing a reboot.
#!/usr/bin/env bash
# Tested on a mac with bash shell.
# This script will fix the dreaded "Another copy of Skype is running"
#First let's try and determine what PID Skype thinks is running and kill it, just in case
SKYPE_PID=`cat ~/Library/Application\ Support/Skype/Skype.pid`
kill -9 $SKYPE_PID
~/Code ☯ gem update
Error loading RubyGems plugin "/Users/tsykoduk/.rvm/gems/ruby-1.9.2-p318/gems/rubygems-bundler-0.3.0/lib/rubygems_plugin.rb": no such file to load -- rubygems_bundler/rubygems_bundler_installer (LoadError)
Error loading RubyGems plugin "/Users/tsykoduk/.rvm/gems/ruby-1.9.2-p318/gems/rubygems-bundler-0.2.8/lib/rubygems_plugin.rb": no such file to load -- rubygems_bundler/rubygems_bundler_installer (LoadError)
Updating installed gems
WARNING: Error fetching data: Errno::ECONNREFUSED: Connection refused - connect(2) (http://rubygems.org/latest_specs.4.8.gz)
Updating acts_as_list
WARNING: Error fetching data: Errno::ECONNREFUSED: Connection refused - connect(2) (http://rubygems.org/specs.4.8.gz)
@tsykoduk
tsykoduk / Play_job.md
Created April 18, 2012 19:15 — forked from lstoll/Play_job.md
Scheudling jobs on heroku with the play framework.

Jobs with the Play! Framework and Heroku

First thing, create a job that runs your task. Don't set a timer or anything on it, we will trigger it manually.

You will need to add two things to your app. First is an endpoint that uses authorization (for your security) to trigger the job in the background. Something like this will do it:

public class JobEndpoint extends Controller{ 
    public static void runTheJob(){ 
        if( "jobuser".equals(request.username) && "jobpass".equals(request.password) ){ 

new WhateverYourJobClassIs().now();