This file contains hidden or 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
# GNU Screen - main configuration file | |
# All other .screenrc files will source this file to inherit settings. | |
# Author: Christian Wills - cwills.sys@gmail.com | |
# Allow bold colors - necessary for some reason | |
attrcolor b ".I" | |
# Tell screen how to set colors. AB = background, AF=foreground | |
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' |
This file contains hidden or 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/python | |
''' Python command line argument example using argparse module | |
Example output: | |
./parser.py --server=pyserver --port=8080,443,25,22,21 --keyword=pyisgood | |
Server name: [ pyserver ] |
This file contains hidden or 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
# knife cheat | |
## Search Examples | |
knife search "name:ip*" | |
knife search "platform:ubuntu*" | |
knife search "platform:*" -a macaddress | |
knife search "platform:ubuntu*" -a uptime | |
knife search "platform:ubuntu*" -a virtualization.system | |
knife search "platform:ubuntu*" -a network.default_gateway |
This file contains hidden or 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
#Source http://fullybaked.co.uk/articles/setting-up-a-local-dns-server-on-osx | |
Local DNS | |
This is my preferred solution. Run a local domain name server on your computer that can resolve all requests for a given top level domain to the localhost, and forward everything else to the Internet as normal. | |
As with everything I write about this will be specifically aimed at Mac OSX, although you can do the same on Linux as dnsmasq is available. For Windows users I can't recommend or suggest a service but the principles will be the same. | |
First off, you will need Homebrew the package manager for OSX. I won't retread installation instructions for it, you can get the most current ones from the Homebrew site. | |
Then follow these steps, which set up dnsmasq so that all domains with a TLD of .loc will point to the localhost |
This file contains hidden or 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
rsync --progress -avz -e "ssh -i ~/.ssh/id_rsa.pub" /my/rsync/tools/path destinationuser@destinationserver:destinationpath |
This file contains hidden or 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
#Your DB properties goes here | |
#Logging File location | |
logging.file=./logs/github.log | |
#Collector schedule (required) | |
github.cron=3 * * * * * | |
github.host=github.com |
This file contains hidden or 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
#dbname=dashboarddb | |
#dbport=27017 | |
#dbreplicaset=false | |
#dbhostport=localhost:27017 | |
#server.contextPath=/api | |
#server.port=8080 | |
#key=OLXa7OVhKvSYC79AoXnZbZ4muibQQGiw | |
# api.properties | |
server.contextPath=/api |
This file contains hidden or 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
#To start API Servers | |
#!/usr/bin/env bash | |
cd ~/workspace/Hygieia/api/target/ | |
java -jar api.jar --spring.config.location=apiapplication.properties | |
#TO start Github collector | |
#!/usr/bin/env bash | |
cd ~/workspace/Hygieia/collectors/scm/github/target/ | |
java -jar github-scm-collector-2.0.5-SNAPSHOT.jar --spring.config.name=github --spring.config.location=github.properties |
This file contains hidden or 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
Jenkins.instance.queue.items.findAll { !it.task.name.contains("Extenda") }.each { | |
println "Cancel ${it.task.name}" | |
Jenkins.instance.queue.cancel(it.task) | |
} | |
Jenkins.instance.items.each { | |
stopJobs(it) | |
} | |
def stopJobs(job) { | |
if (job in jenkins.branch.OrganizationFolder) { | |
// Git behaves well so no need to traverse it. |
This file contains hidden or 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
import hudson.model.* | |
def q = Jenkins.instance.queue | |
q.items.each { q.cancel(it.task) } | |
Jenkins.instance.queue.items.findAll { !it.task.name.contains("Extenda") }.each { | |
println "Cancel ${it.task.name}" | |
Jenkins.instance.queue.cancel(it.task) |