Skip to content

Instantly share code, notes, and snippets.

View felippemr's full-sized avatar
🚀
Enabling growth

Felippe da Motta Raposo felippemr

🚀
Enabling growth
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 - de-de.txt
Last active April 14, 2025 05:43
eXtreme Go-Horse Process
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.
@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])