Skip to content

Instantly share code, notes, and snippets.

View Rockstar04's full-sized avatar

Trent Petersen Rockstar04

View GitHub Profile
@klingerf
klingerf / blue-green.groovy
Created November 4, 2016 03:10
Jenkins pipeline script to perform blue-green deploys to a Kubernetes cluster running linkerd and namerd
node {
def currentVersion = getCurrentVersion()
def newVersion = getNextVersion(currentVersion)
def frontendIp = kubectl("get svc l5d -o jsonpath=\"{.status.loadBalancer.ingress[0].ip}\"").trim()
def originalDst = getDst(getDtab())
stage("clone") {
git url: gitRepo + '.git', branch: gitBranch
}
@wa0x6e
wa0x6e / build.xml
Last active April 23, 2018 20:03
Faster php lint target for jenkins php
<!--
More faster : lint only modified files
--------------------------------------
We create a new target to retrieve a list of modified files
If there is modified files, execute the lint target, else skip
with the `if="modifiedFiles"` option.
The list of modified files is stored in ${files.modified}, one file per line.
@niksamokhvalov
niksamokhvalov / phinx-migrate-all.php
Last active March 7, 2018 20:11
Phinx console command for execute migrations of the all shards
<?php
/**
* Console command for Phinx with argument "all" for executed migrations for multiple databases.
*
* Structure directory for migrations and configs:
* ```
* migrations/
* .db1/
* .db2/
* .db3/
@mertenvg
mertenvg / project-phpunit-skelgen.php
Created December 14, 2012 20:46
Recursively find PHP files and run phpunit-skelgen to create unit test skeleton files. Files must use the .php extension and be PSR-0 compliant, contain a namespace and class name. Files ending in 'Interface.php' are ignored.
#!/usr/bin/env php
<?php
$help = <<<'HELP'
EXAMPLES
./project-phpunit-skelgen.php -s <dir> -o <dir> -b <file>
DESCRIPTION
Recursively find PHP files and run phpunit-skelgen to create unit test skeleton files.
@hector
hector / stale_workers.god
Created October 2, 2012 21:23
Daemon to kill stale resque workers
rails_path = ENV['RAILS_ROOT'] || File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
God.watch do |w|
w.dir = rails_path
w.name = "stale_workers"
w.group = "vocsyn"
w.interval = 30.seconds
w.uid = 'deployer'
w.gid = 'staff'
anonymous
anonymous / config.json
Created September 16, 2014 19:03
Bootstrap Customizer Config
{
"vars": {
"@gray-darker": "lighten(#000, 13.5%)",
"@gray-dark": "lighten(#000, 20%)",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 46.7%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#428bca",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",