Skip to content

Instantly share code, notes, and snippets.

View igalic's full-sized avatar
🔇
dnd

Mina Galić igalic

🔇
dnd
View GitHub Profile
__array_start=1
BROWSER=w3m
BYOBU_ACCENT=#75507B
BYOBU_BACKEND=tmux
BYOBU_CONFIG_DIR=/home/i.galic/.byobu
BYOBU_DARK=black
BYOBU_HIGHLIGHT=#DD4814
BYOBU_LIGHT=white
BYOBU_PAGER=sensible-pager
BYOBU_PREFIX=/usr
rvm get stable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 185 100 185 0 0 106 0 0:00:01 0:00:01 --:--:-- 262
100 10647 100 10647 0 0 3664 0 0:00:02 0:00:02 --:--:-- 12136
Downloading RVM from wayneeseguin branch stable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 131 100 131 0 0 97 0 0:00:01 0:00:01 --:--:-- 107
100 1488k 100 1488k 0 0 250k 0 0:00:05 0:00:05 --:--:-- 475k
@igalic
igalic / Makefile
Created February 13, 2013 08:35
Makefile to create a root-ca, an intermediate signing CA. It can also be used to quickly create keys and Certificates and sign them with that intermediate CA. You should put the root-ca into your Trust Store (preferably as the only CA;) and make sure your programs validate it correctly.
root_DN = /CN=Esotericsystems Root Authority/C=AT/
issuing_DN = /CN=Esotericsystems Issuing Authority/C=AT/
passphrase:
echo -n changeme > $@
#
# Create param files, keys and Self-Signed Certificate for the Root CA
#
root-ca-dsa.param: passphrase
igalic@tynix ...cs/ca/openssl/ssl-conservatory/openssl (git)-[master] % make
gcc -lcrypto -lssl test_client.o openssl_hostname_validation.o -o test_client
test_client.o: In function `send_http_get_and_print':
test_client.c:(.text+0x31): undefined reference to `BIO_new_fp'
test_client.c:(.text+0x4c): undefined reference to `BIO_puts'
test_client.c:(.text+0x6a): undefined reference to `BIO_read'
test_client.c:(.text+0x98): undefined reference to `BIO_write'
test_client.c:(.text+0xaa): undefined reference to `BIO_free'
test_client.o: In function `main':
test_client.c:(.text+0xd4): undefined reference to `SSL_library_init'
forge "http://forge.puppetlabs.com"
mod 'puppetlabs/mysql', "0.6.1"
mod 'puppetlabs/nodejs', "0.2.1"
mod 'puppetlabs/stdlib', "3.2.0"
mod 'puppetlabs/vcsrepo', "0.1.1"
mod 'ripienaar/concat', "0.2.0"
mod "ispavailability/elasticsearch", "0.0.7"
mod "composer",
@igalic
igalic / upstart-forget-pid
Created June 28, 2013 21:37
Don't know the source of this anymore, probably someone from #upstart on freenode. The idea is this: If your upstart job gets stuck, because your config file was somehow broken (an expect fork where none was needed, etc…), you run this script with the stuck pid, then, once it's done, kill it.
#!/usr/bin/python
import os
import time
import sys
target=int(sys.argv[1])
print("Aiming for %d" % target)
# our basedir is '/etc/puppet/'
# we make our moduledir 'modules'
moduledir 'modules'
forge "http://forge.puppetlabs.com"
mod 'puppetlabs/mysql', "0.6.1"
mod 'puppetlabs/nodejs', "0.2.1"
mod 'puppetlabs/stdlib', "3.2.0"
mod 'puppetlabs/vcsrepo', "0.1.1"
define elasticsearch::template(
$file = undef,
$replace = false,
$delete = false,
$host = 'localhost',
$port = 9200
) {
Exec {
path => [ '/bin', '/usr/bin', '/usr/local/bin' ]
@igalic
igalic / opsview:lib:puppet:parser:functions:notify_opsview_reload.rb
Last active December 22, 2015 00:18
exposing a provider function to be used by notify => this is probably a hack :C n.b.: I'm using ":" as path seperator, because gist doesn't like / here.
#
# notify_opsview_reload.rb
#
require File.dirname(__FILE__) + '/../../provider/opsview'
module Puppet::Parser::Functions
newfunction(:notify_opsview_reload, :type => :rvalue, :doc => <<-'EOS'
Reloads the internal Opsview Configuration by calling the REST API
Takes no intput, should be used in a notify.
EOS
---
:backends:
- yaml
:yaml:
:datadir: "/etc/puppet/hieradata/%{::environment}"
:logger: console
:hierarchy: