This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DisableMigrations(object): | |
def __contains__(self, item): | |
return True | |
def __getitem__(self, item): | |
return "notmigrations" | |
MIGRATION_MODULES = DisableMigrations() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Fluent | |
class ServerStatusInput < Input | |
Plugin.register_input('serverstatus', self) | |
config_param :uris, :array, :default => nil | |
config_param :uri, :string, :default => "mongodb://localhost:27017" | |
config_param :stats_interval, :time, :default => 60 # every minute | |
config_param :tag_prefix, :string, :default => "serverstatus" | |
def initialize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var app = express(); | |
var http = require('http').createServer(app); | |
var io = require('socket.io').listen(http); | |
var irc = require('irc'); | |
var commands = ['up', 'down', 'left', 'right', 'reset']; | |
// Conexão com o IRC do canal | |
var client = new irc.Client('irc.twitch.tv', 'cooplays', { | |
nick: 'cooplays', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Name: Diag Backup++ | |
_____ _ ____ _ | |
| __ \(_) | _ \ | | _ _ | |
| | | |_ __ _ __ _ | |_) | __ _ ___| | ___ _ _ __ _| |_ _| |_ | |
| | | | |/ _` |/ _` | | _ < / _` |/ __| |/ / | | | '_ \_ _|_ _| | |
| |__| | | (_| | (_| | | |_) | (_| | (__| <| |_| | |_) ||_| |_| | |
|_____/|_|\__,_|\__, | |____/ \__,_|\___|_|\_\\__,_| .__/ | |
__/ | | | | |
|___/ |_| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The MIT License (MIT) | |
Copyright (c) 2013 Michael E. Cotterell | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eXtreme Go Horse (XGH) Process | |
Quelle: http://gohorseprocess.wordpress.com | |
Übersetzung ursprünglich von https://gist.github.com/Neffez/f8d907ba8289f14e23f3855011fa4e2f | |
1. Ich denke, also ist es nicht XGH. | |
In XGH wird nicht gedacht, es wird das erste gemacht, was in den Sinn kommt. Es gibt auch keine zweite Option, die erste ist schneller. | |
2. Es gibt 3 Wege ein Problem zu lösen: den richtigen Weg, den falschen Weg und den XGH Weg, welcher exakt wie der falsche ist, aber schneller. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Copyright 2012 by Jeff Laughlin Consulting LLC | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import random | |
import re | |
class DelegatingHandler(logging.Handler): | |
def __init__(self, *handlers): | |
logging.Handler.__init__(self) | |
self.handlers = handlers | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
require 'fileutils' | |
# upload with: | |
# curl -v -F "data=@/path/to/filename" http://localhost:4567/user/filename | |
post '/:name/:filename' do | |
userdir = File.join("files", params[:name]) |