Skip to content

Instantly share code, notes, and snippets.

View childnode's full-sized avatar

Marcel Trautwein childnode

View GitHub Profile
.Python
bin/
include/
lib/
pip-selfcheck.json
playbook.retry
@childnode
childnode / Dockerfile.hpi.stub
Last active January 29, 2018 14:07
Jenkins plugins.txt
FROM jenkins/jenkins:${jenkinsVersion}
## note base : https://github.com/jenkinsci/docker/blob/master/Dockerfile
## Manual install Plugins
COPY myPlugin.hpi /usr/share/jenkins/ref/plugins/myPlugin.jpi
RUN unzip -qqt "/usr/share/jenkins/ref/plugins/myPlugin.jpi"
@childnode
childnode / git-guilty.sh
Last active August 11, 2017 15:04
Find the guilty one
function git-guilty() { ./gradlew :test; [ "$?" != 0 ] && git reset --hard HEAD^ && git-guilty; }
git-guilty
echo "========== LAST WORKING ========="
git describe
git log -1 HEAD
echo "========== SUSPICIOUS PATCH ========="
git log -1 -p --stat HEAD@{1}
git reset --hard origin/HEAD
@childnode
childnode / dockerSaveAllImages.scratchfile.sh
Last active July 18, 2017 10:43
dockerSaveAllImages.sh
#!/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
@childnode
childnode / build.gradle
Last active June 19, 2017 04:50
buildSrc/ - eat your own dogfood
apply plugin: 'groovy'
sourceSets {
main {
groovy.srcDirs += "${rootProject.rootDir}/../src/main/groovy"
}
}
@childnode
childnode / build.gradle
Last active March 17, 2017 16:42
multiproject gradle runDefaultTasks on any subproject
// inspired by https://discuss.gradle.org/t/how-to-run-defaults-tasks-of-sub-project-rather-than-default-tasks-of-root-project/6575/6
task runDefaultTasks {
gradle.projectsEvaluated {
subprojects.each { subproject ->
//println subproject.path
subproject.defaultTasks.each {
//println subproject.path + ":" + it
dependsOn subproject.path + ":" + it
}
@childnode
childnode / robots.confluence.txt
Last active March 16, 2017 16:29
atlassian-confluence-config
User-agent: *
# from CONF-8749
Crawl-delay: 5 # per http://en.wikipedia.org/wiki/Robots.txt#Nonstandard_extensions, sets number of seconds to wait between requests to 5 seconds. may not work
Request-rate: 1/5 # per http://en.wikipedia.org/wiki/Robots.txt#Extended_Standard, maximum rate is one page every 5 seconds. may not work
# DISABLED FOR NOW Visit-time: 0600-0845 # per http://en.wikipedia.org/wiki/Robots.txt#Extended_Standard, only visit between 6:00 AM and 8:45 AM UT (GMT), may not work
## Confluence exclusions
Disallow: /plugins/viewsource
Disallow: /pages/viewpreviousversions.action
@childnode
childnode / keybase.md
Created March 13, 2017 22:37
keybase.md for keybase.io

Keybase proof

I hereby claim:

  • I am childnode on github.
  • I am childnode (https://keybase.io/childnode) on keybase.
  • I have a public key ASB5Io_7olQZZLAw0W5EQDfjqOhC9jdIYfj55j3xK4q6-go

To claim this, I am signing this object:

@childnode
childnode / brew-cask-check-updates.bash
Last active March 9, 2017 21:58
brew-cask-check-updates
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
@childnode
childnode / idea_directoryBasedConf.gradle
Last active February 8, 2017 19:12
gradle idea plugin workaround for dir-based configuration
tasks.withType(GenerateIdeaProject) {
doLast {
copy {
from '.'
into '.idea/'
include '*.ipr'
rename { "modules.xml" }
}
project.delete "${project.name}.ipr"
}