Skip to content

Instantly share code, notes, and snippets.

View christianchristensen's full-sized avatar

Chris Christensen christianchristensen

View GitHub Profile
@christianchristensen
christianchristensen / .gitignore
Last active June 14, 2020 23:16
Simple PHP Graph data-structure.
/vendor
@christianchristensen
christianchristensen / README.md
Last active December 19, 2015 11:29
Packaging (with FPM)

Packaging with fpm

Note: remove .git reference prior to putting files in a package. Note: -e option allows specification of metadata.

bundle exec fpm -s dir -t deb -n packageName -v 1.0.0 -C /path/to/code .

On the target system:

  • Info: dpkg -I packageName.deb
@christianchristensen
christianchristensen / .gitignore
Last active December 18, 2015 21:49
Pear FSM composer example
/vendor
#!/usr/bin/env perl
use strict;
use warnings;
use Template::Mustache;
# https://github.com/pvande/Template-Mustache/blob/master/t/read_data_from_hashes.t
print Template::Mustache->render(
<DATA>,
{
@christianchristensen
christianchristensen / composer.json
Created May 14, 2013 19:33
PhpZabbixApi with composer
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/christianchristensen/PhpZabbixApi"
}
],
"require": {
"confirmitsolutionsgmbh/phpzabbixapi": "dev-composer"
}
@christianchristensen
christianchristensen / semver_notes.md
Created May 13, 2013 16:04
Semantic Versioning (SemVer) Notes

https://github.com/isaacs/node-semver | isaacs/node-semver · GitHub https://github.com/isaacs/node-semver/blob/master/semver.js | node-semver/semver.js at master · isaacs/node-semver · GitHub https://www.google.com/search?q=semver+bash&aq=f&oq=semver+bash&aqs=chrome.0.57.2035j0&sourceid=chrome&ie=UTF-8 | semver bash - Google Search https://gist.github.com/ericbmerritt/4013729 | A script to generate a valid semver version in any git repo http://stackoverflow.com/questions/10228073/looking-for-a-way-automate-the-bump-version-with-git-flow | bash - Looking for a way automate the "bump version" with git flow - Stack Overflow https://gist.github.com/petervanderdoes/2877083 | gitflow hooks and filters for WordPress theme development https://gist.github.com/petervanderdoes/2878492 | gitflow hooks and filter for gitflow development https://github.com/frankvilhelmsen/meedings/blob/master/semver.sh | meedings/semver.sh at master · frankvilhelmsen/meedings · GitHub http://semver.org/spec/v1.0.0.html | Semantic Versionin

javascript:(function(){function FormatJSON(oData,sIndent){if(arguments.length<2){var sIndent="";}var sIndentStyle=" ";var sDataType=RealTypeOf(oData);console.log(sDataType);if(sDataType=="array"){if(oData.length==0){return"[]";}var sHTML="[";}else{var iCount=0;$.each(oData,function(){iCount++;return;});if(iCount==0){return"{}";}var sHTML="{";}var iCount=0;$.each(oData,function(sKey,vValue){if(iCount>0){sHTML+=",";}if(sDataType=="array"){sHTML+=("\n"+sIndent+sIndentStyle);}else{sHTML+=("\n"+sIndent+sIndentStyle+"\""+sKey+"\""+": ");}switch(RealTypeOf(vValue)){case"array":case"object":sHTML+=FormatJSON(vValue,(sIndent+sIndentStyle));break;case"boolean":case"number":sHTML+=vValue.toString();break;case"null":sHTML+="null";break;case"string":sHTML+=("\""+vValue+"\"");break;default:sHTML+=("TYPEOF: "+typeof(vValue));}iCount++;});if(sDataType=="array"){sHTML+=("\n"+sIndent+"]");}else{sHTML+=("\n"+sIndent+"}");}return sHTML;}function SortObject(oData){var oNewData={};var aSortArray=[];$.each(oData,function(sKey){a
@christianchristensen
christianchristensen / jenkins.yml.md
Last active February 2, 2017 18:05
.jenkins.yml research and thoughts

.jenkins.yml

Build configuration(s) closer to code; inspired by .travis.yml

  • Default yaml file to define a build that runs make test
  • Preserves No State Between Builds (runs all commands over SSH in isolated virtual machines)
  • The standard Unix exit code of "0" means the build passed; everything else is treated as failure.
  • Specify branches to build (whitelist, blacklist)
  • Secure environment variables (keys, configuration, ...)