Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
## Bash Script to setup a number of boxen
## Pass this script a series of machine names, and watch it go to work
## Email is who gets the report, access_type is the command used to access the remote boxes - usally ssh.
# if you are using telnet, you are doing it wrong
#Lovingly stolen from @tsykoduk, and then hacked to crap
@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 / wp-config-snippet.php
Created April 9, 2012 23:00
Portion of a wp-config.php for heroku
<?php
...
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', $_ENV["XEROUND_DATABASE_NAME"]);
/** MySQL database username */
define('DB_USER', $_ENV["XEROUND_DATABASE_USERNAME"]);
/** MySQL database password */
@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();

~/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 / 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 / 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

Keybase proof

I hereby claim:

  • I am tsykoduk on github.
  • I am tsykoduk (https://keybase.io/tsykoduk) on keybase.
  • I have a public key whose fingerprint is 2E13 CEAB A931 EEF1 A27D ADE8 737D 4459 5F58 5FF5

To claim this, I am signing this object:

h=heroku
g=git
echo '<?php echo "!";?>' > index.php;touch composer.json;$g init;$g add .;$g commit -m "new";$h create;$g push heroku master;$h open
# -*- 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