Skip to content

Instantly share code, notes, and snippets.

@jaymell
jaymell / Main.kt
Created February 18, 2018 05:01
coroutine notes
package test
import kotlinx.coroutines.experimental.async
import kotlinx.coroutines.experimental.launch
import kotlinx.coroutines.experimental.runBlocking
fun main(args: Array<String>) = runBlocking {
loopingSerially()
loopingConcurrently()
@jaymell
jaymell / dsnmasq-userdata-internal-override
Created June 10, 2017 04:38
dnsmasq aws override for internal
yum install dnsmasq
groupadd -r dnsmasq
useradd -r -g dnsmasq dnsmasq
CUSTOM_RESOLV_CONF=/etc/resolv.conf.dhclient
DHCLIENT_HOOKS_FILE=/etc/dhcp/dhclient-enter-hooks
cat > /etc/dnsmasq.conf <<EOF
server=/<internal domain name>/<internal dns server>
listen-address=127.0.0.1
@jaymell
jaymell / dnsmasq-userdata
Last active July 24, 2018 19:53
dnsmasq provisioning from userdata
# http://sysadminsjourney.com/content/2008/07/07/dnsmasq-dhclient/
# man dhclient-script
#################
### amazon linux
#################
yum install dnsmasq
groupadd -r dnsmasq
useradd -r -g dnsmasq dnsmasq