Skip to content

Instantly share code, notes, and snippets.

View polds's full-sized avatar

Peter Olds polds

View GitHub Profile

Keybase proof

I hereby claim:

  • I am polds on github.
  • I am polds (https://keybase.io/polds) on keybase.
  • I have a public key whose fingerprint is C8BC 40A9 A61A BBD1 CB65 641A 1E31 67FE D50E 0664

To claim this, I am signing this object:

@polds
polds / vendor.sh
Created June 29, 2016 16:15
Simple manageable Go Vendoring
#!/bin/sh
set -e
vendor_github() {
pushd .
mkdir -p ./ecs-cli/vendor/src/github.com/$1/$2
cd ./ecs-cli/vendor/src/github.com/$1
git clone https://github.com/$1/$2
cd $2
@polds
polds / docker-cli command
Created December 17, 2015 17:13
Docker MySQL
docker run --name db -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7.10
@polds
polds / salt-call error
Created December 10, 2015 21:12
Salt GPG issues
ID: tyk-dashboard-pkg
Function: pkg.installed
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/salt/state.py", line 1561, in call
**cdata['kwargs'])
File "/usr/lib/python2.6/site-packages/salt/states/pkg.py", line 871, in installed
**kwargs)
File "/usr/lib/python2.6/site-packages/salt/states/pkg.py", line 329, in _find_install_targets
problems = _preflight_check(not_installed, **kwargs)
@polds
polds / newrelic.ini
Created October 12, 2015 17:58
/etc/php.d/newrelic.ini
extension = "newrelic.so"
newrelic.license = "LICENSE_KEY"
newrelic.logfile = "/var/log/newrelic/php_agent.log"
newrelic.appname = "Kyani MODx; backoffice-modx; ${DESIGNATION}-backoffice"
newrelic.capture_params = true
newrelic.attributes.enabled = true
newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log"
newrelic.framework = "no_framework"
#!/bin/sh
docker pull composer/composer
cd src
docker build -t composer .
docker run --rm -v $(pwd):/app composer install --no-dev
@polds
polds / package.json
Created September 22, 2015 21:59
sed replace json
{
"name": "a name",
"version": "0.3.229",
"dependencies": {}
}
@polds
polds / Vagrantfile
Created September 15, 2015 15:57
salt-vagrant-demo
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define :master do |master_config|
master_config.vm.box = "centos65"
master_config.vm.host_name = 'saltmaster.local'
/etc/rc.d/init.d/myservice:
file.managed:
- source: salt://myservice/files/myservice
[root]# salt-key
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
[ERROR ] [Errno 2] No such file or directory
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/salt/utils/parsers.py", line 155, in parse_args
process_option_func()
File "/usr/lib/python2.6/site-packages/salt/utils/parsers.py", line 301, in process_saltfile
saltfile = os.path.join(os.getcwd(), 'Saltfile')