Skip to content

Instantly share code, notes, and snippets.

View Rockstar04's full-sized avatar

Trent Petersen Rockstar04

View GitHub Profile
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",
@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'
@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.
@devyfriend
devyfriend / MY_Router.php
Created January 11, 2013 13:55
Codeigniter DB Router for Modular
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
/* load the MX_Router class */
require APPPATH."third_party/MX/Router.php";
class MY_Router extends MX_Router {
function _set_routing()
{
// Are query strings enabled in the config file? Normally CI doesn't utilize query strings
@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/
@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.
@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
}
@borfast
borfast / new_linux.sh
Last active January 11, 2020 22:54
A script to automatically install as much software as possible for my Ubuntu/Linux Mint development workstation
I moved this to its own repository: https://github.com/borfast/new_linux
@irgeek
irgeek / README.md
Last active December 10, 2021 16:42
Finding AMIs after building an image with Packer

Finding Packer-generated AMIs automatically after builds

The basic technique is to have Packer add a tag with a unique value during the build, and use AWS' built-in filtering capabilities to find that specific AMI after the build finishes.

  • template.json - Shows the settings that need to be added to your template
  • build.sh - Shows how to use the template to do a build and retrieve the AMI information
@aliok
aliok / jenkinsfile-commons.groovy
Created April 26, 2017 12:35
Sample advanced Jenkins pipeline
/**
* This file provides common stuff to be used in the pipelines.
* It is important to load it after repo checkout is done: see https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#triggering-manual-loading
*
*/
/**
* Dumps some info about the environment.
* @return
*/