Skip to content

Instantly share code, notes, and snippets.

Avatar

Rodrigo Fernandes rtfpessoa

View GitHub Profile
@rtfpessoa
rtfpessoa / build.sbt
Created May 20, 2015
sbt Native Packager
View build.sbt
lazy val root = project.in(file("."))
.settings(
dockerBaseImage := "your/base/docker",
dockerExposedPorts := Seq(1234),
version in Docker := buildVersion)
View sbt-common-settings.scala
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,
View playframework-settings.scala
val uiSettings: Seq[Def.Setting[_]] = Seq(
JsEngineKeys.engineType := JsEngineKeys.EngineType.Node,
includeFilter in gzip := "*.html" || "*.css" || "*.js",
DigestKeys.algorithms += "sha1",
includeFilter in digest := "*.html" || "*.css" || "*.js",
UglifyKeys.mangle := false,
pipelineStages := Seq(uglify, digest, gzip),
LessKeys.compress in Assets := true,
includeFilter in(Assets, LessKeys.less) := "*.less",
excludeFilter in(Assets, LessKeys.less) := "_*.less"
View sbt-common-resolvers.scala
val commonResolvers: Seq[Def.Setting[_]] = Seq(
resolvers ++= Seq[Resolver](
DefaultMavenRepository,
Classpaths.typesafeReleases,
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
Classpaths.sbtPluginReleases,
"Eclipse repositories" at "https://repo.eclipse.org/service/local/repositories/egit-releases/content/",
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
)
)
View fix-osx-spotlight.sh
#!/bin/bash
#
# Fix Spotlight
#
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo rm -rf /.Spotlight-V100
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
View HelloWorld.java
public class HelloWorld {
public static void main(String... args) {
// The comment below is no typo.
// \u000d System.out.println("Hello World!");
}
}
@rtfpessoa
rtfpessoa / boot2docker-init.sh
Last active Aug 29, 2015
boot2docker init script for OS X
View boot2docker-init.sh
#!/bin/bash
#
# boot2docker init OS X
#
FORCE=${1-true}
USERS="/Users"
VAR="/var/folders"
@rtfpessoa
rtfpessoa / .zpreztorc
Last active Aug 29, 2015
Prezto Configuration
View .zpreztorc
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
@rtfpessoa
rtfpessoa / nvidia-shield-flash-recovery.sh
Created Aug 22, 2015
Nvidia Shield Recovery Script
View nvidia-shield-flash-recovery.sh
#!/bin/bash
dir=$1
[[ -z dir ]] && echo "Missing bins dir!"
fastboot flash recovery {dir}/recovery.img
fastboot flash boot {dir}/boot.img
fastboot flash system {dir}/system.img
fastboot flash userdata {dir}/userdata.img
@rtfpessoa
rtfpessoa / uninstall_mactex.sh
Last active Sep 6, 2015 — forked from uchida/uninstall_mactex.sh
MacTeX uninstaller script based on pkgutil command
View uninstall_mactex.sh
#!/bin/bash
# MacTeX uninstaller script based on pkgutil command
# by Akihiro Uchida, CC0 dedicated to the public domain
# see http://creativecommons.org/publicdomain/zero/1.0/
IFS=$(echo -en "\n")
for pkg in $(pkgutil --pkgs|grep org.tug.mactex); do
volume="$(pkgutil --pkg-info "$pkg"|grep volume|cut -d' ' -f2-)"
location="$(pkgutil --pkg-info "$pkg"|grep location|cut -d' ' -f2-)"
echo "remove all of the files installed under the $pkg"
for file in $(pkgutil --files "$pkg"); do
You can’t perform that action at this time.