Skip to content

Instantly share code, notes, and snippets.

View jage's full-sized avatar

Johan Eckerström jage

View GitHub Profile
@jage
jage / find_gitlab_git.sh
Created July 16, 2013 17:12
Find gitlab repositories
find . -name '.git' -type d | while read git_path; do
(
cd `dirname $git_path`
(git remote -v|grep -q gitlab) && echo "`dirname $git_path` is still on gitlab"
)
done
@jage
jage / README.md
Last active December 14, 2015 02:28
Group domain counts by main domain.

Data

123 oh.duh.se
9000  duh.se

Output

@jage
jage / unipong.rb
Created November 20, 2012 01:19
Ruby 1.8.7
require 'curses'
include Curses
stdscr.keypad c=v=h=1
def w t,*o
setpos *o
addstr t
refresh
end
l=7
p=0
#!/usr/bin/ruby
require 'socket'
require 'rubygems'
require "xmpp4r"
require "xmpp4r/pubsub"
require "xmpp4r/pubsub/helper/servicehelper.rb"
require "xmpp4r/pubsub/helper/nodehelper.rb"
require "xmpp4r/pubsub/helper/nodehelper.rb"
# This is a code example for the Ruby HTTP library Typhoeus
# here's an example for twitter search
# Including Typhoeus adds http methods like get, put, post, and delete.
# What's more interesting though is the stuff to build up what I call
# remote_methods.
class Twitter
include Typhoeus
remote_defaults :on_success => lambda {|response| JSON.parse(response.body)},
:on_failure => lambda {|response| puts "error code: #{response.code}"},