Skip to content

Instantly share code, notes, and snippets.

View paulczar's full-sized avatar

Paul Czarkowski paulczar

View GitHub Profile
$ docker ps
ID                  IMAGE                 COMMAND             CREATED             STATUS              PORTS
02ccb9c0fb8e        paulczar/znc:latest   start-znc           5 days ago          Up 5 days           49173->6667         
a7dd99cc7653        paulczar/znc:latest   start-znc           10 days ago         Up 10 days          49172->6667         
1fee2ef5337e        paulczar/znc:latest   start-znc           4 weeks ago         Up 4 weeks          49171->6667         
2f61a32e31ca        paulczar/znc:latest   start-znc           5 weeks ago         Up 5 weeks          49170->6667         
8d6a91853355        paulczar/znc:latest   start-znc           7 weeks ago         Up 7 weeks          49169->6667         
7a42a6b01d8c        paulczar/znc:latest   start-znc           4 months ago        Up 4 months         49168->6667         
5b76cb53e660        paulczar/znc:latest   start-znc           6 months ago        Up 6 months         49167->6667         
@paulczar
paulczar / gist:e412cb5e11e6a8e69945
Created May 1, 2014 23:12
building and running mysql on solum
vagrant@devstack:~$ solum app create /opt/stack/solum/examples/plans/mysql.yaml
+-------------+---------------------------------------------------------------------+
| Property | Value |
+-------------+---------------------------------------------------------------------+
| description | mysql server |
| uri | http://10.0.2.15:9777/v1/plans/86665816-389c-4c5b-8b8b-e20d536f878b |
| uuid | 86665816-389c-4c5b-8b8b-e20d536f878b |
| name | mysql_server |
+-------------+---------------------------------------------------------------------+
vagrant@devstack:~$ solum assembly create http://10.0.2.15:9777/v1/plans/86665816-389c-4c5b-8b8b-e20d536f878b --assembly=mysql01
@paulczar
paulczar / Vagrantfile
Created November 27, 2013 15:26
add help command for your vagrantfile with this one easy trick
if ARGV[0] == 'help' and ARGV[1] == 'vagrantfile'
puts <<eof
How to use this Vagrantfile:
env['BRANCH'] - set a different branch to clone
eof
ARGV.shift(2)
ARGV.unshift('status')
@paulczar
paulczar / logstash.conf
Last active December 19, 2015 11:09
logstash config file for testing docker
input {
tcp {
port => "514"
type => "syslog"
tags => ["gisticles"]
}
}
filter {
grok {
@paulczar
paulczar / Dockerfile
Created June 14, 2013 03:38
Chef-Zero Docker File
# Chef-Zero
#
# VERSION 0.0.1
FROM base
MAINTAINER Paul Czarkowski "username.taken@gmail.com"
RUN apt-get update
RUN apt-get install -y ruby1.9.1-dev build-essential
@paulczar
paulczar / gist:5777094
Created June 13, 2013 20:32
git rebase redux
$ git clone --recursive -b folsom git@github.com:paulczar/chef-cookbooks.git
$ cd chef-cookbooks
$ git pull git@github.com:rcbops/chef-cookbooks.git folsom
$ git checkout vagrant
$ git rebase folsom
First, rewinding head to replay your work on top of it...
Applying: adding keystone-setup role
Applying: keystone role now uses keystone-setup role
Applying: Unwinding merge 78a339509
Applying: vagrantfile and provisioning scripts
@paulczar
paulczar / gist:5777035
Created June 13, 2013 20:26
git rebase output
git clone git@github.com:paulczar/chef-cookbooks.git
cd chef-cookbooks
git checkout folsom
git pull git@github.com:rcbops/chef-cookbooks.git folsom
git checkout vagrant
git rebase folsom
git push
here it complained that I was behind ... so ran a pull then the push.
@paulczar
paulczar / gist:5610433
Created May 20, 2013 04:34
steps to create network under quantum for vagrant openstack example.
root@allinone:~# OS_USERNAME=admin OS_PASSWORD=secrete OS_TENANT_NAME=admin OS_AUTH_URL=http://33.33.33.60:35357/v2.0 keystone tenant-list
+----------------------------------+---------+---------+
| id | name | enabled |
+----------------------------------+---------+---------+
| 4c280f7ee4404e42bc8994ee37d06ee3 | admin | true |
| fd1f4ef9051849359347f1f6a78a4b58 | service | true |
+----------------------------------+---------+---------+
root@allinone:~# quantum net-create --tenant-id 4c280f7ee4404e42bc8994ee37d06ee3 test_net
You must provide a username via either --os-username or env[OS_USERNAME]
root@allinone:~# OS_USERNAME=admin OS_PASSWORD=secrete OS_TENANT_NAME=admin OS_AUTH_URL=http://33.33.33.60:35357/v2.0 quantum net-create --tenant-id 4c280f7ee4404e42bc8994ee37d06ee3 test_net
@paulczar
paulczar / gist:5493708
Created May 1, 2013 04:16
Patch to fix libiconv for glibc >= 2.16 - originally found at http://www.itkb.ro/kb/linux/patch-libiconv-pentru-glibc-216
--- srclib/stdio.in.h.orig 2011-08-07 16:42:06.000000000 +0300
+++ srclib/stdio.in.h 2013-01-10 15:53:03.000000000 +0200
@@ -695,7 +695,9 @@
/* It is very rare that the developer ever has full control of stdin,
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
@paulczar
paulczar / gist:5459528
Created April 25, 2013 13:04
openstack chef broked.
using https://github.com/rcbops/chef-cookbooks inside vagrant with a chef 10.x Server and Chef 10.x client/knife etc.
vagrant@chef:~/chef-cookbooks$ knife node show allinone
Node Name: allinone
Environment: example_environment
FQDN: allinone
IP: 10.0.2.15
Run List: role[allinone]
Roles: