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 | |
# If you would like to do some extra provisioning you may | |
# add any commands you wish to this file and they will | |
# be run after the Homestead machine is provisioned. | |
# Be sure to keep up to date with the files and default Settings | |
# if there is an update in the image the paths may change | |
# based upon laravel/homestead image for virtualbox version 0.2.7 |
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 | |
inotifywait -m $PWD -r -e create -e moved_to -e delete | | |
while read path action file; do | |
TITLE="Filesystem changed" | |
MESSAGE="The file '$file' appeared in directory '$path' via '$action'" | |
echo ${MESSAGE} | |
notify-send "${TITLE}" "${MESSAGE}" | |
done |
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 -n $(date +"%Y-%m-%d-") | xsel -b |
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
// http://stackoverflow.com/questions/510462/is-system-nanotime-completely-useless | |
import scala.collection.mutable | |
val numThreads = 10 | |
val numValuesPerThread = 10 | |
var threadResult = mutable.Map[Int, Seq[Long]]() |
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
# to get a git prompt: | |
source /usr/share/git/completion/git-prompt.sh | |
GIT_PS1_SHOWDIRTYSTATE=true | |
#GIT_PS1_SHOWSTASHSTATE=true | |
GIT_PS1_SHOWUNTRACKEDFILES=true | |
GIT_PS1_SHOWCOLORHINTS=true | |
# colorize bash prompt | |
# see also http://misc.flogisoft.com/bash/tip_colors_and_formatting | |
#PS1='[\u@\h \W]\$ ' # To leave the default one |
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
trait Util { | |
trait AttributeResolver[T] { | |
def get(): T | |
} | |
implicit object StringResolver extends AttributeResolver[String] { | |
def get(): String = "Alpha" | |
} | |
implicit object IntResolver extends AttributeResolver[Int] { | |
def get(): Int = 47 |
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 scala.annotation.tailrec | |
class Item(name: String) { | |
override def toString: String = name | |
} | |
class Group(name: String, items: List[Item]) extends Item(name) { | |
def size: Int = items.size | |
def get(i: Int): Item = items(i) | |
} |
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
[ | |
{ | |
"name": "Sofle Choc", | |
"author": "Brian Low" | |
}, | |
[ | |
{ | |
"y": 0.2, | |
"x": 3, | |
"c": "#e8e7e3", |