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
import hudson.model.* | |
// extract the version tag from the console log | |
def version_pattern = ".*\\[\\s*INFO\\s*\\]\\s+VERSION=(.*)\\s*\$" | |
def matcher = manager.getLogMatcher( version_pattern ) | |
if ( matcher?.matches() ) { | |
// add the version string to the job summary | |
def ver = matcher.group(1) | |
manager.addInfoBadge( "Version: $ver" ) |
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
set ofu=syntaxcomplete#Complete | |
" remap completion to control+space | |
inoremap <expr> <C-Space> pumvisible() \|\| &omnifunc == '' ? | |
\ "\<lt>C-n>" : |
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
# define a transport for mail you want to deliver | |
echo "$VALID_DOMAIN smtp:[$VALID_RELAYHOST]" > /etc/postfix/transport | |
postconf -e transport_maps = hash:/etc/postfix/transport | |
# everything else goes to a bogus relayhost, which causes a bounce | |
postconf -e relayhost = 169.254.0.0 | |
# immediately throw away all bounces | |
postconf -e maximal_queue_lifetime = 0 | |
postconf -e bounce_queue_lifetime = 0 |
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
--- scriptmerge.php.dist 2012-11-30 11:52:31.000000000 -0800 | |
+++ scriptmerge.php 2012-11-30 11:49:07.000000000 -0800 | |
@@ -300,7 +300,7 @@ | |
$cacheExpireFile = $cachePath.'_expire'; | |
// Check the cache | |
- if(true || ScriptMergeHelper::hasExpired($cacheExpire, $cachePath)) { | |
+ if( ScriptMergeHelper::hasExpired($cacheExpireFile, $cachePath)) { | |
$buffer = null; |
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
--- opencart.php 2013-01-24 09:15:54.000000000 -0800 | |
+++ /tmp/opencart.php 2013-01-24 09:16:53.000000000 -0800 | |
@@ -115,6 +115,7 @@ | |
if (!$setting['serialized']) { | |
self::$config->set($setting['key'], $setting['value']); | |
} else { | |
+ $setting['value'] = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $setting['value'] ); | |
self::$config->set($setting['key'], unserialize( $setting['value'] ) ); | |
} | |
} |
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
#!/usr/bin/env bash | |
# find . -maxdepth 1 -type d -printf '%T@ %p\0' | |
# -- For every directory in the current directory, print a numeric timestamp, a space, the filename, and a null | |
# | |
# sort -z -n | |
# -- Split the output on nulls (-z) and sort numerically (-n) | |
# | |
# gawk 'BEGIN {RS="\0";ORS="\0";FS=" "} NR<=3 {print $2}' | \ | |
# -- Print first (ie, oldest) three filenames in the list, separated by nulls. | |
# |
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/sh | |
USER=$1 | |
# get the shadow hash from the user entry | |
dscl . read /Users/$USER dsAttrTypeNative:ShadowHashData | tail -1 \ | |
# remove everything but hex data and spaces | |
| tr -dc '0-9a-f ' \ |
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
sh-3.2# puppet resource x_user fnord ensure=present | |
2013-08-28 09:36:12.919 ruby[73195:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]' | |
*** First throw call stack: | |
( | |
0 CoreFoundation 0x00007fff92f37b06 __exceptionPreprocess + 198 | |
1 libobjc.A.dylib 0x00007fff99da73f0 objc_exception_throw + 43 | |
2 CoreFoundation 0x00007fff92eea117 -[__NSPlaceholderArray initWithObjects:count:] + 119 | |
3 RubyCocoa 0x0000000105697f2c set_octypes_for_format_str + 1900 | |
4 RubyCocoa 0x0000000105696163 rbobj_to_nsobj + 595 | |
5 RubyCocoa 0x0000000105696648 rbobj_to_ocdata + 328 |
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
input { | |
file { | |
path => "/var/log/jenkins/*" | |
type => "jenkins-server" | |
start_position => "beginning" | |
} | |
} | |
# The first filter munges the logs into discrete events. | |
filter { |
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
from copy import deepcopy | |
from django.db import models | |
from django.db.models import Q | |
from mezzanine.pages.models import Page | |
from mezzanine.core.models import RichText | |
from django.contrib.auth.models import Group, User | |
from mezzanine.pages.managers import PageManager | |
from django.utils.timezone import now | |
from django.conf import settings | |
from django.contrib.contenttypes.models import ContentType |