Skip to content

Instantly share code, notes, and snippets.

@teadur
teadur / gist:d250483ccf45a96612d9
Created October 5, 2015 21:38
sk.crl.nginx.sh
#!/bin/bash
# update crls for nginx
WGET="wget --quiet"
pushd /etc/nginx/sk/crl
$WGET https://sk.ee/crls/juur/crl.crl
$WGET https://sk.ee/crls/eeccrca/eeccrca.crl
$WGET https://sk.ee/crls/esteid/esteid2007.crl
$WGET https://sk.ee/repository/crls/esteid2011.crl
openssl crl -in esteid2007.crl -out esteid2007.crl -inform DER
openssl crl -in crl.crl -out crl.crl -inform DER
@teadur
teadur / sensu-pg
Last active December 8, 2016 03:09
build.postgres.for.sensu
wget https://ftp.postgresql.org/pub/source/v9.4.6/postgresql-9.4.7.tar.bz2
apt-get install libreadline-dev
export CFLAGS=-I/opt/sensu/embedded/include
export LDFAGS=-L/opt/sensu/embedded/lib
./configure --prefix /opt/sensu/embedded --with-openssl
make
make install
@teadur
teadur / grok
Last active December 24, 2016 12:40
grok
pane külma vette (0,5l)
*10-15 nelgi "tera",
*pool pöialt ingevrijuurt viilutad õhukesteks liistakateks
*siis kaneelikoor - murrad tükkideks
kui keema hakkab, siis mingi ~10 mintsa keedad täie pasaga.
siis tuli maha, riisud välja kogu selle tahke olluses ning kallad mingi umbes samapalju või natuke vähem rummi juurde (300ml+)
siis paned mett mingi kulbitäie (palju) näiteks ( nelgi/sidruni maitse "peitmiseks )
nii , et oleks ikka mõnusalt magus ja siis pigistad ühe sidruni mahla sinna sisse ja jood kuumalt
Peale seda keerad magama, joove/uni ja tervis garanteeritud.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
<command>
<check>
<domain:check
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
<domain:name>tld.ee</domain:name>
</domain:check>
</check>
<clTRID>QueryNO-1337</clTRID>
@teadur
teadur / gist:1b257022fd018888c5e9ed35d488df7f
Created March 23, 2017 12:02
build-postgres-for-sensu-postgres-plugin
# Building Postgres on Debian against sensu embedded openssl to build pg/sensu-plugins-postgres gem(s)
# if you are missing build utils install them
#apt-get install build-essentials
apt-get install libreadline-dev
cd /usr/local
# you should download same or higher vrersion of postgres then you are running
wget https://ftp.postgresql.org/pub/source/v9.4.11/postgresql-9.4.11.tar.gz
tar -xf postgresql-9.4.11.tar.gz
cd /usr/local/postgresql-9.4.11
CFLAGS=-I/opt/sensu/embedded/include LDFLAGS=-L/opt/sensu/embedded/lib ./configure --prefix /opt/sensu/embedded --with-openssl
http://media.e-ope.ee:1935/live/ip/playlist.m3u8
ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'
# 2.2.7
apt-get install libssl1.0-dev
# registry-bundle-install
sudo apt-get install libreadline-dev libxml2-dev libpq-dev
@teadur
teadur / test.sh.generator
Last active April 17, 2017 03:07
test.sh
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
git clone https://github.com/bzed/pkg-pmacct
wget http://www.pmacct.net/pmacct-1.6.2.tar.gz
cd pkg-pmacct
git checkout upstream
gbp import-orig ../pmacct-1.6.2.tar.gz -u 1.6.2 --pristine-tar
gbp buildpackage --git-export-dir=../build-area/
# no sign
gbp buildpackage -uc -us --git-export-dir=../build-area/
# build on DIST
DIST=jessie gbp buildpackage -uc -us --git-export-dir=../build-area/ --git-pbuilder --git-dist=jessie-backports
@teadur
teadur / .bashrc
Last active September 24, 2017 19:05
.bashrc
# add to end
export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[ $(tput sgr0)\]"
export HISTSIZE=50000
export HISTTIMEFORMAT="%F %T "