Highly extensible software like Emacs, Vim, and Neovim tend to grow their own package managers. A software developer, for example, might want to install editor plugins that hook into a particular programming language's linter or language server. The programmer's text editor is therefore extended to support managing additional software to extend the text editor. If this loop continues for too long, the programmer's editor becomes more delicate and complex. The remedy for this problem is to manage software using dedicated tools apart
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
const mapData = msg.payload; | |
const _pixelSize = mapData.pixelSize; | |
let _robotXY = null; | |
for (let i = 0; i < mapData.entities.length; i++) { | |
if (mapData.entities[i].type == "robot_position") { | |
_robotXY = { | |
x: Math.floor(mapData.entities[i].points[0] / _pixelSize), | |
y: Math.floor(mapData.entities[i].points[1] / _pixelSize) | |
}; | |
break; |
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
AWS_ACCESS_KEY_ID= | |
AWS_SECRET_ACCESS_KEY= | |
AWS_HOSTED_ZONE_ID= |
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 kotlin.coroutines.* | |
import kotlin.coroutines.intrinsics.* | |
/** | |
* Defines deep recursive function that keeps its stack on the heap, | |
* which allows very deep recursive computations that do not use the actual call stack. | |
* To initiate a call to this deep recursive function use its [invoke] function. | |
* As a rule of thumb, it should be used if recursion goes deeper than a thousand calls. | |
* | |
* The [DeepRecursiveFunction] takes one parameter of type [T] and returns a result of type [R]. |
There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket
You may use the same computer for work and personal development and need to separate your work.
When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.
You may have different projects you're working on where you would like to segregate your access.
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
# coding: utf-8 | |
from __future__ import unicode_literals | |
import appex | |
import console | |
from os import remove | |
import youtube_dl | |
def main(): | |
if not appex.is_running_extension(): |
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
OpenJDK 1.8 | |
1. Follow the instructions from https://github.com/AdoptOpenJDK/homebrew-openjdk to tap and install jdk8. | |
2. Run the following command to create the necessary directories | |
sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-1.8.0_172.jdk | |
sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-1.8.0_172.jdk/Contents | |
sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-1.8.0_172.jdk/Contents/MacOS | |
3. Run the following commands to link to the existing homebrew-openjdk install |
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 kotlinx.coroutines.experimental.DefaultDispatcher | |
import kotlinx.coroutines.experimental.channels.ReceiveChannel | |
import kotlinx.coroutines.experimental.channels.consumeEach | |
import kotlinx.coroutines.experimental.channels.produce | |
import kotlinx.coroutines.experimental.delay | |
import kotlinx.coroutines.experimental.runBlocking | |
import kotlin.coroutines.experimental.CoroutineContext | |
fun <T> ReceiveChannel<T>.debounce( | |
wait: Long = 300, |
I’m documenting for myself what I would look for in a validation library. The code I currently need it for is in Kotlin so I have the entire JVM ecosystem to choose from.
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 script installs and configures WSL to work with Docker Toolbox for Windows. | |
# 1. Install WSL (check out [bowinstaller](https://github.com/xezpeleta/bowinstaller) for programmatic installation. | |
# 2. Run the contents of this script in Bash. (copy and paste works fine, no need to save) | |
# | |
sudo -sEH << 'EOM' | |
# Install the docker client and docker-compose | |
apt-get update && apt-get install -y curl ca-certificates | |
curl -sSL https://get.docker.com/ | sh | |
curl -L "https://github.com/docker/compose/releases/download/1.11.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose |
NewerOlder