Skip to content

Instantly share code, notes, and snippets.

View aaronwalker's full-sized avatar
☁️
FTaaS - Fixing things as a Service in the ⛈ and sometimes BTaaS 😉

Aaron Walker aaronwalker

☁️
FTaaS - Fixing things as a Service in the ⛈ and sometimes BTaaS 😉
View GitHub Profile
@aaronwalker
aaronwalker / git-tag-delete.sh
Created October 6, 2014 06:52
bulk git tag delete
while read tag; do
echo deleting $tag
git tag -d $tag
git push upstream :refs/tags/$tag
done </tmp/tags
Function WSUSUpdate {
$Criteria = "IsInstalled=0 and Type='Software'"
$Searcher = New-Object -ComObject Microsoft.Update.Searcher
try {
$SearchResult = $Searcher.Search($Criteria).Updates
if ($SearchResult.Count -eq 0) {
Write-Output "There are no applicable updates."
exit
}
else {
#goes into $HOME/.jenkins
baseuri: https://jenkins.example.com/
jobs:
- Build-Master
stoplight: 1
# ssl_opts is any option listed in "perldoc IO::Socket::SSL"
ssl_opts:
verify_hostname: 0
# # by default we ignore invalid certs; set to nil to validate
# SSL_verify_callback:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<!-- connect to the local ActiveMQ broker -->
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="brokerURL" value="tcp://amq:61616"/>
@aaronwalker
aaronwalker / jenkins-users.groovy
Created March 29, 2019 11:06
Create Jenkins users
import jenkins.model.*
import hudson.security.*
def instance = Jenkins.getInstance()
def hudsonRealm = new HudsonPrivateSecurityRealm(false)
hudsonRealm.createAccount("ciinabox","xxxxx")
instance.setSecurityRealm(hudsonRealm)
//FYI the replaces the existing maxtrix config so ensure you have all users you
@aaronwalker
aaronwalker / postgres_activity.sql
Created May 20, 2019 12:09
current postgres activity
SELECT max(now() - xact_start) AS duration, pid, state, query FROM pg_stat_activity
WHERE state IN ('idle in transaction', 'active')
GROUP BY pid, query, state ORDER BY duration;