This file contains 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
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) |
This file contains 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
# cat << ►_◄ > /dev/null | |
# | |
# Tmux config | |
# | |
# set Zsh as your default Tmux shell | |
set-option -g default-shell /bin/zsh | |
# colors please |
This file contains 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
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 { |
This file contains 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
#!/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* |
This file contains 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
# | |
# 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!" |
This file contains 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
#!/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 |
This file contains 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
/* | |
* Simple Javascript singleton example | |
*/ | |
var Printer = function () { | |
// Object stateless code here | |
var counter = 0; | |
//counter is useless here | |
this.print("[" + counter++ + "] String to print!"); |
This file contains 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
# OSX taken from: https://github.com/github/gitignore/blob/master/Global/OSX.gitignore | |
# ---------------------------------------------------------------------------------------------- | |
.DS_Store | |
# Thumbnails | |
._* | |
# Files that might appear on external disk | |
.Spotlight-V100 | |
.Trashes | |
# Windows taken from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore |
This file contains 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
#include <stdio.h> | |
int main(void) | |
{ | |
int x = 1; | |
int y = 2; | |
int val = 5 + ( x = 3, x + y ) + 7; | |
printf("VAL: %d | X: %d | Y: %d", val, x, y); |
This file contains 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
object CodacySbt extends sbt.AutoPlugin { | |
private val buildVersion = sys.props.getOrElse("build.number", "dev") | |
object autoImport extends Modules { | |
val commonAppSettings: Seq[Def.Setting[_]] = Seq( | |
organization := "codacy", | |
scalaVersion := "2.11.6", | |
testOptions in Test := Nil, |
OlderNewer