data class User(val name: Stirng)
User("Ben")
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 | |
# Print MAC addr for eth0 + wlan0 | |
ETH0=$(cat /sys/class/net/eth0/address) | |
WLAN0=$(cat /sys/class/net/wlan0/address) | |
# Post to ptsv3.com (set 'xxx' to whatever toilet you want e.g. abc123) | |
# View at http://ptsv3.com/t/xxx | |
curl -X POST -H "Content-Type: application/json" \ | |
-d '{ "eth":"'$ETH0'", "wlan0":"'$WLAN0'"}' \ |
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
/** | |
* Interface for Unidirectional State Flow via [Event] and [State]. | |
*/ | |
interface EventState<E, S> : Event<E>, State<S> | |
/** | |
* Interface for emitting State | |
*/ | |
interface State<S> { | |
/** |
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
// Foundation | |
/** | |
* Validation interface | |
*/ | |
interface Validation { | |
fun apply(value: String): ValidationResult | |
} | |
/** |
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
<scheme name="Material - Light" version="142" parent_scheme="Default"> | |
<metaInfo> | |
<property name="created">2021-05-20T14:51:37</property> | |
<property name="ide">AndroidStudio</property> | |
<property name="ideVersion">4.2.1.0</property> | |
<property name="modified">2021-05-20T14:51:43</property> | |
<property name="originalScheme">Material - Light</property> | |
</metaInfo> | |
<attributes> | |
<option name="LOGCAT_ASSERT_OUTPUT"> |
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
#!/usr/bin/env bash | |
FILE=$1 | |
ffmpeg -i $FILE -vf fps=10,scale=600:-1 ${FILE%.*}.gif |
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 | |
# Author: rmcdaniel | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
STORY_NUMBER=$(echo $BRANCH_NAME | sed -n 's/^.*\/\(.*-[0-9]*\)#.*/\1/p') | |
if [ x != x${STORY_NUMBER} ]; then | |
sed -i.back "1s/^/$STORY_NUMBER /" "$1" | |
fi |