- Site: euruko2015.org
- Activity:
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 | |
PRESERVE_FILES_COUNT=3 | |
ARCHIVE_EXTENSION='.sql.bz2' | |
if [ ! -z $1 ] && [ ! -z $2 ] && [ ! -z $3 ] && [ ! -z $4 ]; then | |
backup_dir=$1 | |
db_user=$2 | |
db_pass=$3 | |
db_name=$4 | |
archive_name="$(date +\%m\%d\%Y-\%H\%M\%S)_$db_name.sql.bz2" |
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 | |
# | |
# This script will mount /Users in the boot2docker VM using NFS (instead of the | |
# default vboxsf). It's probably not a good idea to run it while there are | |
# Docker containers running in boot2docker. | |
# | |
# Usage: sudo ./boot2docker-use-nfs.sh | |
# |
I hereby claim:
- I am smileart on github.
- I am smileart (https://keybase.io/smileart) on keybase.
- I have a public key whose fingerprint is FD58 5BDB BCC3 16CC D35B 3D84 4BE7 D8CF D397 7061
To claim this, I am signing this object:
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
# https://github.com/rgrove/rawgit + https://github.com/rstacruz/vim-opinion + | |
# https://github.com/tpope/vim-sensible + https://github.com/tpope/vim-sleuth + | |
# https://sunaku.github.io/vim-256color-bce.html + | |
# http://bit.ly = vim.min | |
# | |
# © Smile @rT, 2015 | |
VIM_MIN="/tmp/vim.min" | |
echo -e "se nocp\nruntime plugin/netrwPlugin.vim\nset t_ut=" > $VIM_MIN | |
curl -Ls -XGET https://rawgit.com/rstacruz/vim-opinion/master/plugin/opinion.vim >> $VIM_MIN | |
curl -Ls -XGET https://rawgit.com/tpope/vim-sensible/master/plugin/sensible.vim >> $VIM_MIN |
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
#!/usr/bin/env ruby | |
require 'lastfm' | |
require 'launchy' | |
require 'letters' | |
require 'faraday' | |
require 'json' | |
require 'colorize' | |
class LastLove |
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 ruby | |
# watch -n900 ~/visa.rb | |
require 'mechanize' | |
require 'pushover' | |
PUSHOVER_USER_KEY = 'c05138ffb9af54d98e8969874a611969' | |
PUSHOVER_APP_TOKEN = '1aec7a21cda115407a4a96d12435c28d' | |
VISAS_LIST_PAGE_URL = 'http://www.ge2ua.tpcontact.co.uk/tlscontact' | |
VISAS_LIST_PAGE_XPATH = '//*[@id="node-12"]/div[1]/div/div/div/p[1]' |