Skip to content

Instantly share code, notes, and snippets.

View monde's full-sized avatar
🐲

Mike Mondragon monde

🐲
View GitHub Profile
*.notice;authpriv,remoteauth,ftp,install,internal.none /var/log/system.log
kern.* /var/log/kernel.log
# Send messages normally sent to the console also to the serial port.
# To stop messages from being sent out the serial port, comment out this line.
#*.err;kern.*;auth.notice;authpriv,remoteauth.none;mail.crit /dev/tty.serial
# The authpriv log file should be restricted access; these
# messages shouldn't go to terminals or publically-readable
# files.
@monde
monde / gist:1279860
Created October 12, 2011 00:18 — forked from joevandyk/gist:1279847
refresh css js
javascript:(function(){var img = document.createElement('img'); img.src = "/css-refresh?" + Date.now(); var h,a,f;a=document.getElementsByTagName('link');for(h=0;h<a.length;h++){f=a[h];if(f.rel.toLowerCase().match(/stylesheet/)&&f.href){var g=f.href.replace(/(&|%5C?)forceReload=\d+/,'');f.href=g+(g.match(/\?/)?'&':'?')+'forceReload='+(new Date().valueOf())}};})()
$ heroku logs
2011-10-28T12:50:03+00:00 app[app.1]: rooms: [ '383535' ],
2011-10-28T12:50:03+00:00 app[app.1]: account: 'hark1',
2011-10-28T12:50:03+00:00 app[app.1]: domain: 'hark1.campfirenow.com',
2011-10-28T12:50:03+00:00 app[app.1]: authorization: 'Basic N2FlZWRjMjAzMGNiODFkZTg3NDQxNDJhYjk2ZGMwZThkOTI1ODFlMDp4' }
2011-10-28T12:50:03+00:00 app[app.1]: /^CommityMcBot:?\s*(calc|calculate|convert|math)( me)? (.*)/i
2011-10-28T12:50:03+00:00 app[app.1]: /^CommityMcBot:?\s*keep (.*) alive$/i
2011-10-28T12:50:03+00:00 app[app.1]: /^CommityMcBot:?\s*don'?t keep (.*) alive$/i
2011-10-28T12:50:03+00:00 app[app.1]: /^CommityMcBot:?\s*what are you keeping alive/i
@monde
monde / gist:1327782
Created October 31, 2011 15:40
Convore Exception
Traceback (most recent call last):
File "/home/convore/virtualenvs/convore/lib/python2.6/site-packages/eventlet/wsgi.py", line 336, in handle_one_response
result = self.application(self.environ, start_response)
File "/home/convore/virtualenvs/convore/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 245, in __call__
response = middleware_method(request, response)
File "/home/convore/convore/django_ext/middleware/log.py", line 30, in process_response
'trk': getattr(request, 'trk', None),
File "/home/convore/convore/django_ext/logging.py", line 27, in log_event
if has_session and request.user.is_authenticated():
File "/home/convore/virtualenvs/convore/lib/python2.6/site-packages/django/contrib/auth/middleware.py", line 9, in __get__
@monde
monde / README
Created November 8, 2011 22:08
how to build a vagrant box image
= Ubuntu Natty 64 Server Vagrant Base Box
== Description
This is a Vagrant Base Box based upon the Ubuntu Natty 64 Server. It was built
according to the Vagrant Base Box building guide:
http://vagrantup.com/docs/base_boxes.html
This box's main characteristic is the use of Ruby 1.9.2 built from source.
2011-11-16T13:54:13+00:00 app[app.1]: 16 Nov 13:54:13 - SEND: PONG :fugbot
2011-11-16T13:59:13+00:00 app[app.1]: 16 Nov 13:59:13 - SEND: PONG :fugbot
2011-11-16T14:04:13+00:00 app[app.1]: 16 Nov 14:04:13 - SEND: PONG :fugbot
2011-11-16T14:09:13+00:00 app[app.1]: 16 Nov 14:09:13 - SEND: PONG :fugbot
2011-11-16T14:14:13+00:00 app[app.1]: 16 Nov 14:14:13 - SEND: PONG :fugbot
2011-11-16T14:19:13+00:00 app[app.1]: 16 Nov 14:19:13 - SEND: PONG :fugbot
2011-11-16T14:24:13+00:00 app[app.1]: 16 Nov 14:24:13 - SEND: PONG :fugbot
2011-11-16T14:29:13+00:00 app[app.1]: 16 Nov 14:29:13 - SEND: PONG :fugbot
2011-11-16T14:34:13+00:00 app[app.1]: 16 Nov 14:34:13 - SEND: PONG :fugbot
2011-11-16T14:44:13+00:00 app[app.1]: 16 Nov 14:44:13 - SEND: PONG :fugbot
@monde
monde / konami.js
Created December 12, 2011 19:50
Konami CSI Miami cheat code for www.hark.com
var keyCodes = [];
$(document).keydown(function(e){
keyCodes.push(e.keyCode);
if(keyCodes.toString().indexOf("38,38,40,40,37,39,37,39,66,65") >= 0){
console.log('Yeaaaaaah!');
$(document).unbind('keydown', arguments.callee);
var pid = 'pndmzxvqkl';
var container = $('#copyright');
$.getJSON('http://www.hark.com/clips/' + pid + '.json', function(data){
var audio = $('<audio>').attr({ 'src': data.url, 'preload': 'auto' });
@monde
monde / foo.rb
Created December 13, 2011 22:33
module Bar
class << self
attr_accessor :foo
end
class Foo
attr_accessor :foo
def initialize
@foo = "foo"
end
class Publisher < ActiveRecord::Base
include Rails.application.routes.url_helpers
default_url_options[:host] = Rails.application.config.host
belongs_to :application
serialize :options
validates_presence_of :application_id
Started GET "/collections/nfngpynlrd-the-godfather" for 127.0.0.1 at 2012-01-06 15:30:21 -0800
Processing by CollectionsController#show as */*
Parameters: {"id"=>"nfngpynlrd-the-godfather"}
SessionId:
Useragent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3
Collection Load (0.2ms) SELECT `collections`.* FROM `collections` WHERE `collections`.`pid` = 'nfngpynlrd' LIMIT 1
Clip Load (0.3ms) SELECT DISTINCT `clips`.* FROM `clips` INNER JOIN `media_file_clips` ON `media_file_clips`.`clip_id` = `clips`.`id` INNER JOIN `clip_links` ON `clips`.`id` = `clip_links`.`clip_id` WHERE `clip_links`.`clip_linkable_id` = 6134 AND `clip_links`.`clip_linkable_type` = 'Collection' AND (clips.published = 1 AND clips.deleted = 0 AND clips.removed = 0 AND clips.private = 0 AND clips.duplicate = 0 AND media_file_clips.id is not null and media_file_clips.media_file_id <> 3069) ORDER BY clips.curated_position_idx asc, listens_week DESC LIMIT 10 OFFSET 0