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
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; |
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 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 |
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
<?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"/> |
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
#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: |
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
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 { |
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
while read tag; do | |
echo deleting $tag | |
git tag -d $tag | |
git push upstream :refs/tags/$tag | |
done </tmp/tags |
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
#!/bin/bash | |
# Set custom OS X defaults | |
# See: github.com/mathiasbynens/dotfiles | |
# General UI/UX | |
# ---------------------------------------------------------------------- | |
# Disable Menu bar transparency | |
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false |
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
<?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" | |
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0" | |
xmlns:camel="http://camel.apache.org/schema/blueprint" | |
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" | |
xsi:schemaLocation=" | |
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd | |
http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0 http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0/blueprint-ext.xsd | |
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd |
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
#!/bin/bash | |
# | |
# chkconfig: 345 88 12 | |
# description: Karaf is a java container. | |
### BEGIN INIT INFO | |
# Provides: $activemq | |
### END INIT INFO | |
. /etc/init.d/functions | |
. /etc/profile.d/java.sh |
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
echo -n "mytext"| openssl sha1 -binary | base64 |
NewerOlder