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 `your package` | |
import org.scalatest.{FlatSpecLike, GivenWhenThen, Matchers} | |
class ExampleUnitTest extends FlatSpecLike with GivenWhenThen with Matchers { | |
"A service/class that you want to test" should "provide some result/expectation" in { | |
Given("Some service/class") | |
def service(i: Int) = i * 2 |
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
#version 150 | |
uniform float time; | |
uniform vec2 resolution; | |
uniform vec2 mouse; | |
uniform vec3 spectrum; | |
uniform sampler2D texture0; | |
uniform sampler2D texture1; | |
uniform sampler2D texture2; |
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
STUFF = this is some stuff |
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
inline fun SharedPreferences.edit(changes: SharedPreferences.Editor.() -> SharedPreferences.Editor) { | |
edit().changes().apply() | |
} | |
fun ImageView.tintSrc(@ColorRes colorRes: Int) { | |
val drawable = DrawableCompat.wrap(drawable) | |
DrawableCompat.setTint(drawable, ContextCompat.getColor(context, colorRes)) | |
setImageDrawable(drawable) | |
if (drawable is TintAwareDrawable) invalidate() // Because in this case setImageDrawable will not call invalidate() | |
} |
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 | |
echo "Current branch: $GIT_BRANCH" | |
MAIN_SNAPSHOT_BRANCH="origin/develop" | |
GRADLE_FILE="app/build.gradle" | |
CURRENT_COMMIT_HASH=$(git rev-parse --short HEAD) | |
IS_BETA_SNAPSHOT_BUILD=false | |
if [[ $GIT_BRANCH == $MAIN_SNAPSHOT_BRANCH ]] ; then # Cheks if this build is a beta release |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
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
import hlt | |
from hlt import NORTH, EAST, SOUTH, WEST, STILL, Move, Square | |
import random | |
myID, game_map = hlt.get_init() | |
hlt.send_init("RandomPythonBot") | |
while True: | |
game_map.get_frame() |
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
This Gist contains the sample code for improving the sample Halite random bot in Java. |
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
# Useful stuff for fastlane configuration. Most of the stuff is taken | |
# from public examples anc collecetd it here to have everything in one place. | |
# Set app version or build number: | |
# https://github.com/fastlane/fastlane/blob/10f316756fb0b2c3e486b4fb3c26ac6393e32146/fastlane/docs/Actions.md#modifying-project | |
increment_version_number( | |
version_number: '2.1.1' # Set a specific version number |
NewerOlder