Skip to content

Instantly share code, notes, and snippets.

View felippemr's full-sized avatar
💭
Enjoying the ride

Felippe da Motta Raposo felippemr

💭
Enjoying the ride
  • Carta
  • Cupertino, CA
View GitHub Profile
@NotSqrt
NotSqrt / settings_test_snippet.py
Last active May 1, 2022 01:34 — forked from nealtodd/settings_test_snippet.py
Another shot at this problem ..
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
return "notmigrations"
MIGRATION_MODULES = DisableMigrations()
@chrisckchang
chrisckchang / in_serverstatus.rb
Created June 25, 2014 15:43
MongoDB serverStatus output plugin
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
@cranic
cranic / gist:9663995
Created March 20, 2014 13:43
Client de comandos por chat do Twitch.tv
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',
anonymous
anonymous / gist:9354868
Created March 4, 2014 20:24
'''
Name: Diag Backup++
_____ _ ____ _
| __ \(_) | _ \ | | _ _
| | | |_ __ _ __ _ | |_) | __ _ ___| | ___ _ _ __ _| |_ _| |_
| | | | |/ _` |/ _` | | _ < / _` |/ __| |/ / | | | '_ \_ _|_ _|
| |__| | | (_| | (_| | | |_) | (_| | (__| <| |_| | |_) ||_| |_|
|_____/|_|\__,_|\__, | |____/ \__,_|\___|_|\_\\__,_| .__/
__/ | | |
|___/ |_|
@mepcotterell
mepcotterell / LICENSE
Last active August 19, 2023 16:44
Simple Python Plugin Manager
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:
@banaslee
banaslee / XGH - en.txt
Last active May 3, 2024 14:47
eXtreme Go-Horse Process
eXtreme Go Horse (XGH) Process
Source: http://gohorseprocess.wordpress.com
1. I think therefore it's not XGH.
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster.
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster.
XGH is faster than any development process you know (see Axiom 14).
@n1ywb
n1ywb / retries.py
Created May 1, 2012 17:48
A Python function retrying decorator
#!/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:
@vsajip
vsajip / deleghand.py
Created January 16, 2012 23:53
Example of a delegating handler
import logging
import random
import re
class DelegatingHandler(logging.Handler):
def __init__(self, *handlers):
logging.Handler.__init__(self)
self.handlers = handlers
@gavinheavyside
gavinheavyside / trivial_file_upload_service.rb
Created November 3, 2009 20:09
Trivial file upload service using Sinatra
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])