Skip to content

Instantly share code, notes, and snippets.

View mwilc0x's full-sized avatar
:shipit:

Mike Wilcox mwilc0x

:shipit:
View GitHub Profile
C:\Ruby192\lib\ruby\gems\1.9.1\gems\gollum-1.1.1>gollum
== Sinatra/1.1.2 has taken the stage on 4567 for development with backup from WEBrick
[2011-01-15 20:36:04] INFO WEBrick 1.3.1
[2011-01-15 20:36:04] INFO ruby 1.9.2 (2010-12-25) [i386-mingw32]
[2011-01-15 20:36:04] INFO WEBrick::HTTPServer#start: pid=5092 port=4567
Grit::InvalidGitRepositoryError - C:/Ruby192/lib/ruby/gems/1.9.1/gems/gollum-1.1.1:
C:/Ruby192/lib/ruby/gems/1.9.1/gems/grit-2.4.1/lib/grit/repo.rb:51:in `initialize'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/gollum-1.1.1/lib/gollum/wiki.rb:62:in `new'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/gollum-1.1.1/lib/gollum/wiki.rb:62:in `initialize'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/gollum-1.1.1/lib/gollum/frontend/app.rb:145:in `new'
root@bt:/usr/lib/ruby/gems/1.8/gems/gollum-1.1.1# gollum
== Sinatra/1.1.2 has taken the stage on 4567 for development with backup from Mongrel
Grit::InvalidGitRepositoryError - /usr/lib/ruby/gems/1.8/gems/gollum-1.1.1:
/usr/lib/ruby/gems/1.8/gems/grit-2.4.1/lib/grit/repo.rb:51:in `initialize'
/usr/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/wiki.rb:62:in `new'
/usr/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/wiki.rb:62:in `initialize'
/usr/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/frontend/app.rb:145:in `new'
/usr/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/frontend/app.rb:145:in `show_page_or_file'
/usr/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/frontend/app.rb:40:in `GET /'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1057:in `call'
root@bt:/usr/lib/ruby/gems/1.8/gems/gollum-1.1.1# heroku logs
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- gollum (LoadError)
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from config.ru:1
from /home/heroku_rack/heroku.ru:23
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:46:in `new'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:46:in `map'
from /home/heroku_rack/heroku.ru:18
root@bt:/usr/lib/ruby/gems/1.8/gems/gollum-1.1.1# heroku logs
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load
-- gollum (LoadError)
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from config.ru:1
from /home/heroku_rack/heroku.ru:23
from /home/slugs/e2d27f54-f930-4f24-9e41-1a0c6c95a1e7/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/bu
ilder.rb:46:in `instance_eval'
from /home/slugs/e2d27f54-f930-4f24-9e41-1a0c6c95a1e7/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/bu
ilder.rb:46:in `initialize'
@mwilc0x
mwilc0x / gist:2474154
Created April 23, 2012 21:52
Merging two SQL queries into one
I want to divide the correct count by total count (where the domain names match)
/* Get the total count */
SELECT DISTINCT(domain_name), COUNT(*) AS count
FROM recommendations
WHERE rec_date LIKE '2007%'
GROUP BY domain_name
ORDER BY count DESC;
@mwilc0x
mwilc0x / gist:3366672
Created August 16, 2012 04:03
peer connection class
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Arrays;
import java.util.logging.Logger;
/**
* The Class PeerUploader.
@mwilc0x
mwilc0x / gist:3366818
Created August 16, 2012 04:25
The peer connector class
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Arrays;
import java.util.logging.Logger;
/**
// inject $rootScope into application when we bootstrap
// call below line of code when save is called after
// client has been switched (ie. we have called the re-assign dialog and user clicked continue)
$rootScope.$broadcast('clientChange');
app.controller('MainCtrl', function MainCtrl() {
$scope.MainClientSelected = {};
$scope.Client2Selected = {};
@mwilc0x
mwilc0x / gist:7817585
Last active December 30, 2015 10:39
I successfully receive data in mapsRequest object, however when I go to
app.controller('MapCtrl', ['$scope', '$rootScope', function ($scope, $rootScope) {
$scope.lat = 40.722283;
$scope.lng = -74.005623;
$scope.mapOptions = {
center: new google.maps.LatLng($scope.lat, $scope.lng),
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var express = require("express"),
http = require("http"),
app = express(),
port = process.env.PORT || 3000,
socketio = require('socket.io'),
imdb = require('imdb-api');
app.use(express.static(__dirname + '/dist'));
var server = http.createServer(app);