Make sure you have Docker installed.
Pull the Travis Erlang image
docker run --name travis-debug -dit travisci/ci-erlang:packer-1494865151 /sbin/init
Execute the container
docker exec -it travis-debug -u travis bash -l
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] |
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 |
# | |
# 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" |
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' |
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
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 |