Skip to content

Instantly share code, notes, and snippets.

Rodrigo Fernandes rtfpessoa

Block or report user

Report or block rtfpessoa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rtfpessoa
rtfpessoa / .gitconfig
Last active Dec 31, 2015
git Configuration
View .gitconfig
#
# rtfpessoa git Configuration
#
# core {{{
[core]
editor = /usr/bin/nano
pager=less -x4
quotepath = false
# excludesfile = /Users/rtfpessoa/.gitignore
View typed-actors-routing.scala
val defaultAkkaTimeout = 60
val defaultNumberOfActors = 10
def getComponentActor[T <: AnyRef](timeout: akka.util.Timeout = Timeout(Duration(defaultAkkaTimeout, SECONDS)))(implicit m: Manifest[T]): T = {
val className = this.classCache.get(m.runtimeClass.getName)
val actorCount = defaultNumberOfActors
val actors = createRouterActors(actorCount,className,timeout)
val router = system.actorOf(Props.empty.withRouter(SmallestMailboxRouter.create(actors.toIterable.asJava)))
TypedActor(system).typedActorOf(TypedProps(Reflect(system).actorClassFor(className.get)).withTimeout(timeout), router)
@rtfpessoa
rtfpessoa / .tmux.conf
Last active Aug 29, 2015
Tmux Configuration
View .tmux.conf
# cat << ►_◄ > /dev/null
#
# Tmux config
#
# set Zsh as your default Tmux shell
set-option -g default-shell /bin/zsh
# colors please
View SimpleGestureController.java
package pt.utl.ist.cmov.bomberman.controllers;
import pt.utl.ist.cmov.bomberman.controllers.interfaces.SimpleGestureListener;
import android.app.Activity;
import android.view.GestureDetector;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
public class SimpleGestureController extends SimpleOnGestureListener {
@rtfpessoa
rtfpessoa / android-studio-cleaner.sh
Created Jun 1, 2014
Script to Clean Android Studio on MacOS
View android-studio-cleaner.sh
#!/bin/sh
#
# MacOS Android Studio Cleaner
#
rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
@rtfpessoa
rtfpessoa / java-8-ami.md
Last active Oct 17, 2019
[Guide] Install Oracle Java (JDK) 8 on Amazon EC2 Ami
View java-8-ami.md
@rtfpessoa
rtfpessoa / revoke-delete.sh
Created Oct 11, 2014
Revoke delete directory permissions
View revoke-delete.sh
#
# Simple script to revoke delete permissions
#
DIRECTORY=$1
if [ "$DIRECTORY" != "" ]; then
chmod 0700 $1
chmod +a "group:everyone deny delete" $1
echo "Delete permissions revoked with success!"
@rtfpessoa
rtfpessoa / oracle-jdk-remove.sh
Created Oct 25, 2014
Oracle JDK Removal Mac OSx
View oracle-jdk-remove.sh
#!/bin/bash
#
# Oracle JDK Removal Mac OSx
#
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk<version>.jdk
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane
@rtfpessoa
rtfpessoa / singleton.js
Created Feb 13, 2015
Simple Javascript singleton example
View singleton.js
/*
* Simple Javascript singleton example
*/
var Printer = function () {
// Object stateless code here
var counter = 0;
//counter is useless here
this.print("[" + counter++ + "] String to print!");
@rtfpessoa
rtfpessoa / idea.vmoptions
Last active Apr 25, 2017
IntelliJIDEA 14 VM Options
View idea.vmoptions
-ea
-server
-Xms512m
-Xmx2048m
-XX:MaxPermSize=512m
-XX:MaxMetaspaceSize=512m
-XX:ReservedCodeCacheSize=256m
-XX:CMSIncrementalDutyCycleMin=0
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
You can’t perform that action at this time.