Slides
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 | |
# param_1: string | param_2: file | |
is_option_in_file () { | |
if [[ ! -z "$1" && ! -z "$2" ]]; then | |
egrep -q "$1" "$2" | |
if [[ $? = '0' ]] | |
then | |
echo '1' |
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
// ======= Motivation ======== | |
// http://www.theverge.com/2015/6/30/8871591/spotify-to-apple-music-migrate | |
// http://i.giphy.com/1zTqgW6bS2jWU.gif | |
// https://goo.gl/lMTvOj | |
// All the delays in this script could be adapted | |
// for your own needs… | |
// Add this code to the Script Editor (OS X Only!) | |
// and press Run… http://i.giphy.com/QfGMSZ25v3pGU.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
text = <<~DOC | |
ID Name Type Size Date | |
735557379 Mitch Murder - Kung Fury (Lost Tapes) - 2015 FOLDER 38.37 MB 8 months ago | |
589243897 A Game Of Thrones ~ Books 1-5 EPUB,MOBI & PDF [GrYff0N] FOLDER 83.36 MB 2 years ago | |
735557525 VA - Kung Fury (2015) FOLDER 109.84 MB 8 months ago | |
819683233 19000 FOLDER 1.77 GB 2 days ago | |
819682329 18000 FOLDER 3.12 GB 2 days ago | |
819681592 17000 FOLDER 4.23 GB 2 days ago | |
784060241 Doctor.Who.2005.S12.1080p.BluRay.x264-SHORTBREHD FOLDER 31.73 GB 2 months ago | |
601795129 chill.institute FOLDER 51.66 GB 2 days ago |
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
# Based on | |
https://stackoverflow.com/questions/38298645/how-should-i-backup-restore-docker-named-volumes | |
# Dependencies | |
brew install fzf fx | |
# Backup (docker-compose running and we're in the same dir) | |
export CONTAINER_NAME=$(docker ps --format '{{.Names}}' | fzf) && \ | |
export VOLUME_NAME=$(docker inspect $CONTAINER_NAME | fx '.[0].Mounts[0].Name') && \ | |
docker stop $(docker inspect $CONTAINERNAME | fx '.[0].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
require 'tapp' | |
require 'tapp/printer' | |
require 'amazing_print' | |
# Module to define own Tapp printer | |
module Tapp::Printer | |
# Custom AmazingPrint based printer for Tapp | |
class AmazingPrint < Base | |
# Prints the object using custom (AmazingPrint) printer | |
# |
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
require 'benchmark/ips' | |
class RangedHashSelect | |
def initialize(hash) | |
@data = Hash[ | |
hash.keys.map do |el| | |
el.respond_to?(:member?) ? el : (el..el) | |
end.zip(hash.values) | |
] | |
end |
"International video game revenue is estimated to be $81.5B in 2014. This is more than double the revenue of the international film industry in 2013. In 2015 it was estimated at US$91.5 billion." © https://en.wikipedia.org/wiki/Video_game_industry
http://fortune.com/2016/02/16/video-game-industry-revenues-2015/