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 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" | |
) | |
) |
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 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" |
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, |
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 | |
# | |
# Find current script directory | |
# | |
ScriptDirectory="$( cd "$( dirname "$0" )" && pwd )" | |
echo "This script is currently @ $ScriptDirectory" |
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
# 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
-ea | |
-server | |
-Xms512m | |
-Xmx2048m | |
-XX:MaxPermSize=512m | |
-XX:MaxMetaspaceSize=512m | |
-XX:ReservedCodeCacheSize=256m | |
-XX:CMSIncrementalDutyCycleMin=0 | |
-XX:+UseCodeCacheFlushing | |
-XX:+UseConcMarkSweepGC |
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
#!/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 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!" |