- "Introduction to Bluetooth Low Energy" by Adafruit.
# Fancy Terminal Prompt ---------------------------------------------------------- | |
txtcyn=$'\e[0;36m' # Cyan | |
txtred=$'\e[0;31m' # Red | |
txtwht=$'\e[0;37m' # White | |
txtrst=$'\e[0m' # Text Reset | |
function parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} |
[merge] | |
tool = studio | |
[mergetool "studio"] | |
prompt = false | |
cmd = /Applications/Android\\ Studio.app/Contents/MacOS/studio merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED") | |
trustExitCode = true | |
[diff] | |
tool = studio | |
[difftool "studio"] | |
prompt = false |
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
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
private val HEX_CHARS = "0123456789ABCDEF".toCharArray() | |
fun ByteArray.toHex() : String{ | |
val result = StringBuffer() | |
forEach { | |
val octet = it.toInt() | |
val firstIndex = (octet and 0xF0).ushr(4) | |
val secondIndex = octet and 0x0F | |
result.append(HEX_CHARS[firstIndex]) |
package org.gradle.training | |
import org.gradle.api.tasks.Input | |
import org.gradle.api.tasks.OutputDirectory | |
import org.gradle.api.tasks.TaskAction | |
import org.gradle.api.DefaultTask | |
import org.gradle.util.GFileUtils | |
import org.gradle.api.artifacts.Configuration | |
import org.gradle.api.artifacts.component.ModuleComponentIdentifier | |
import org.gradle.maven.MavenModule |
Centralize the support libraries dependencies in gradle
Working with multi-modules project, it is very useful to centralize the dependencies, especially the support libraries.
A very good way is to separate gradle build files, defining something like:
root
--gradleScript
----dependencies.gradle