-
get latest docker travis build tag and run it in the background
docker run -dit travisci/ci-ruby:packer-1494868441 /sbin/init
-
exec container
docker exec -it <container_id> bash -l
-
change user
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
XCode free space | |
https://medium.com/@nqtuan86/clean-mac-storage-for-xcodes-users-5fbb32239aa5# | |
~/Library/Caches/com.apple.dt.Xcode | |
~/Library/Developer/Xcode/DerivedData | |
~/Library/Developer/Xcode/Archives | |
~/Library/Developer/Xcode/iOS\ DeviceSupport/ | |
~/Library/Developer/CoreSimulator | |
xcrun simctl delete unavailable |
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
alias git-remove-untracked='git fetch --prune && git branch -r | awk "{print \$1}" | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk "{print \$1}" | xargs git branch -d' |
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
# | |
# Executes commands at the start of an interactive session. | |
# | |
# Authors: | |
# Sorin Ionescu <[email protected]> | |
# | |
# Source Prezto. | |
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then | |
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" |
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
alias solr_start='cd ~/sunspot-1.1.0/solr/ && java -Xms512M -Xmx1024M -Djetty.port=8982 -Dsolr.data.dir=/home/flashgordon/ruby-dev/sas/solr/data/development -jar start.jar' | |
# Custom function | |
function solr_stop() { | |
pids=$(ps aux | grep -v awk | awk '/java.*-Djetty.port=8982/' |cut -c10-15) | |
if [ "x${pids}" != "x" ]; then | |
for pid in $pids; do | |
kill -9 $pid | |
echo -e "\033[1;32m[OK] \033[00msolr stopped" | |
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
module Enumerable | |
def dups | |
inject({}) {|h,v| h[v]=h[v].to_i+1; h}.reject{|k,v| v==1}.keys | |
end | |
end | |
# arr = [2,8,8,42,7,33,42] | |
# puts arr.dups.inspect | |
# [8, 42] |