Skip to content

Instantly share code, notes, and snippets.

# Add to the alternatives system
#
# On Ubuntu 8.04, we have the following priorities:
#
# /usr/bin/konqueror 100
# /usr/bin/seamonkey 80
# /usr/bin/firefox-3.0 40
# /usr/bin/firefox-2 30
# /usr/bin/galeon 120
#
//
// MCCChoiceGroupDataControllerSpec.m
// Chance Choice
//
// Created by Maximilian Gaß on 27.05.13.
// Copyright (c) 2013 Maximilian Gaß. All rights reserved.
//
#import "Kiwi.h"
#import "MCCChoiceDataController.h"
#!/bin/bash -e
directory="${PWD##/Users/mxey}"
ssh -4 -t ubuntu.local "cd /mnt/hgfs/mxey${directory} && $*"
mxey@mxeybook ~/Documents/satq (git)-[master] % git remote show origin
* remote origin
Fetch URL: git@github.com:mxey/satq.git
Push URL: git@github.com:mxey/satq.git
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
forge "http://forge.puppetlabs.com"
mod "puppetlabs/vcsrepo"
mod "puppetlabs/stdlib"
mod 'apache', git: 'git://github.com/puppetlabs/puppetlabs-apache.git'
ruby: warning: -K is specified; it is for 1.8 compatibility and may cause odd behavior
/Users/mxey/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/ui.rb:129: warning: assigned but unused variable - pid
/Users/mxey/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/progress.rb:57: warning: shadowing outer local variable - params
/Users/mxey/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/progress.rb:55: warning: assigned but unused variable - ui_process
/Users/mxey/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/ui.rb:292:in `to_plist': An object in the argument tree could not be converted (ArgumentError)
from /Users/mxey/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/ui.rb:292:in `block in initialize'
from /Users/mxey/Library/Application Support/TextMate/Managed/Bundles/Bu
def completed_putio_transfers(user_token)
putio_connection = Faraday.new('https://api.put.io/v2/') do |faraday|
faraday.request :oauth2, user_token, param_name: :oauth_token
faraday.response :json, content_type: /\bjson$/
faraday.response :raise_error
faraday.adapter Faraday.default_adapter
end
transfers = putio_connection.get('transfers/list').body['transfers']
transfers.select! { |t| t['status'] == 'COMPLETED' || t['status'] == 'SEEDING' }
@mxey
mxey / fringe.pl
Last active December 16, 2015 21:09
use v5.16;
use warnings;
package TreeNode {
use Moose;
has [qw(left right)] => (
is => 'rw',
isa => 'TreeNode',
);
use v5.16;
use warnings;
use Carp;
use List::Util qw(sum);
use Test::More tests => 3;
sub playlist_duration {
my ($playlist) = @_;
return seconds_to_duration(
@mxey
mxey / bot.pl
Last active December 16, 2015 21:00
use v5.16;
use warnings;
package Tester {
use Moose::Role;
requires 'statistics';
}
package Channel {