Skip to content

Instantly share code, notes, and snippets.

View luiseduardobrito's full-sized avatar

Luis Eduardo Brito luiseduardobrito

  • São Paulo, Brazil
View GitHub Profile
@JakeWharton
JakeWharton / README.md
Last active April 17, 2023 14:07
A JUnit @rule which launches an activity when your test starts. Stop extending gross ActivityInstrumentationBarfCase2!
@luiseduardobrito
luiseduardobrito / express.js
Created December 3, 2014 20:05
Express Static Sever
/**
* This is your Node app's main file
* Don't forget to create a Procfile with `web: node app` in repository root for Heroku support
*/
var express = require('express');
var http = require('http');
var path = require('path');
var bodyParser = require('body-parser');
var methodOverride = require('method-override');
@dmouse
dmouse / Dockerfile
Last active June 18, 2016 04:13
This is a Dockerfile for build a image with scala and play framework
# Docker image with scala and play framework
FROM centos
MAINTAINER David Flores "[email protected]"
RUN yum update -y
RUN yum install java-1.7.0-openjdk.x86_64 -y
RUN /bin/rpm -ivh http://downloads.typesafe.com/scala/2.11.0/scala-2.11.0.rpm
RUN yum install wget unzip -y >/dev/null
RUN cd /opt && wget http://downloads.typesafe.com/play/2.2.3/play-2.2.3.zip && unzip play-2.2.3.zip
@willurd
willurd / web-servers.md
Last active April 20, 2025 00:42
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@reu
reu / pub-sub.js
Created April 9, 2013 01:51
node.js redis pub-sub example
var redis = require("redis")
, subscriber = redis.createClient()
, publisher = redis.createClient();
subscriber.on("message", function(channel, message) {
console.log("Message '" + message + "' on channel '" + channel + "' arrived!")
});
subscriber.subscribe("test");
@felipecsl
felipecsl / restart coreaudio daemon
Last active March 16, 2025 22:43
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
# or...
sudo killall coreaudiod
@feliperazeek
feliperazeek / PlayHttpServletRequest.java
Created June 18, 2011 23:22
Adapter class to define a HttpServletRequest from a Play Framework Request Object
/**
* Copyright 2011 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software