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 | |
docker images | grep -v "^REPOSITORY"| awk '{print $1":"$2}' | tee -a scratch.$(date +%F).txt | |
for i in $(cat scratch.2017-07-18.txt); do echo docker pull $i; done > scratch.$(date +%F).restore.sh | |
echo -e "\n[DONE] For Restore please execute: scratch.$(date +%F).restore.sh" | |
chmod +x ./scratch.$(date +%F).restore.sh |
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
// fixing setup of what idea does not automatically - see https://github.com/bmuschko/gradle-docker-plugin/blob/master/build.gradle | |
idea.project { | |
jdkName = '1.8' | |
languageLevel = compatibilityVersion | |
ipr.withXml { provider -> | |
def node = provider.asNode() | |
// Use GIT | |
def vcsConfig = node.component.find { it.'@name' == 'VcsDirectoryMappings' } |
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
// see https://github.com/bmuschko/gradle-docker-plugin/blob/master/build.gradle | |
jar { | |
manifest { | |
attributes 'Implementation-Title': 'Gradle Docker plugin', | |
'Implementation-Version': version, | |
'Built-By': System.getProperty('user.name'), | |
'Built-Date': new Date(), | |
'Built-JDK': System.getProperty('java.version'), | |
'Built-Gradle': gradle.gradleVersion | |
} |
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
## deletes all "fork/*" branches on remote | |
git push fork -f $(for i in $(git branch -r | grep "fork/"); do echo :$(echo $i | sed -e 's/fork\///'); 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
s | |
| | |
assertNotNull\((?:\s*([^,;$]+))\s*\) | |
| | |
assertThat\($1, notNullValue\(\)\) | |
| |
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
currentBranch="$(git branch -q --no-column --no-color | grep '^*' | awk '{print $2}')"; | |
for branch in $(git branch -q --no-column --no-color | sed -e 's/^*/ /'); do | |
git rebase origin/${branch} ${branch} --onto origin/${branch}; | |
done | |
git co ${currentBranch} | |
unset currentBranch |
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
function cmpany { i=(); while read x; do for j in ${i[@]}; do echo "$j vs. $x"; cmp $j $x; done; i+=("$x"); 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
mkdir -p ~/fubu/; | |
for i in $(./adb shell ls | grep -ve "^proc\b" | grep -v "^sys\b" | tr -s [:space:] ' '); do | |
echo "====$i==="; | |
./adb pull -a /$i ~/fubu/$i; | |
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
for i in /etc/ssh/ssh_host_*_key; do ssh-keygen -f $i -t $(echo $i | awk 'BEGIN {FS= "_"} { print $3}'); 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
for cask in $(brew cask list -1); do | |
echo -n "${cask} : "; | |
caskLatest=$(brew cask info $cask | head -1 | awk -F: '{print $2}' | tr -d '[[:space:]]'); | |
caskCurrentDir=$(brew cask info $cask | grep -e "^$(brew --prefix).*/${cask}/"| head -1| awk '{print $1}'); | |
[ ! -d $(dirname ${caskCurrentDir})/${caskLatest} ] && echo "outdated : ("$(basename ${caskCurrentDir})" -> "${caskLatest}")" || echo "current"; | |
done |