Skip to content

Instantly share code, notes, and snippets.

View sckevmit's full-sized avatar

Szymon Dziech sckevmit

View GitHub Profile

Dark version

wget --no-check-certificate https://raw.github.com/seebi/dircolors-solarized/master/dircolors.ansi-dark
mv dircolors.ansi-dark .dircolors
eval `dircolors ~/.dircolors`

git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git
cd gnome-terminal-colors-solarized
./set_dark.sh
#!/bin/bash
if [[ $UID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
service conntrackd stop
# stop conntrackd.The daemon maybe writes the information about destroyed connections to a logfile.
# /var/log/conntrackd-stats.log
python-pip:
pkg.installed
docker-py:
pip.installed:
- require:
- pkg: python-pip
# TODO: ensure docker-py is declared a requirement for all dockerio states without having to explicitely declare the requirement in each container state again
@sckevmit
sckevmit / contrail-db-row-replication-check
Created January 20, 2016 13:14 — forked from ajayhn/contrail-db-row-replication-check
contrail-db-row-replication-check
# REPLACE localhost with DB-IP %s/localhost/<IP>/g
#assume obj_fq_name_table keys as utf8;
#assume obj_fq_name_table comparator as utf8;
#assume obj_fq_name_table validator as utf8;
#assume obj_uuid_table keys as utf8;
#assume obj_uuid_table comparator as utf8;
#assume obj_uuid_table validator as utf8;
LOG_FILE=repl-check.out.$(date +%Y%m%d-%H%M%S)
@sckevmit
sckevmit / tasks.py
Created November 29, 2016 10:31 — forked from daniellawrence/tasks.py
Queuing fabric tasks and stream reading output using celery & redis - A little bit of evil with tempfiles and stdout redirection.
# RUN ME, I am the worker!
# $ pip install fabric celery-with-redis
# $ celery -A tasks worker -E --loglevel=debug
from celery import Celery
from time import sleep
from fabric.api import env, run, execute
import sys
celery = Celery('tasks', broker='redis://', backend='redis://')
["hello.coffee"]
@sckevmit
sckevmit / cloudstack-sethostname.sh
Created September 22, 2017 10:49 — forked from makuk66/cloudstack-sethostname.sh
dhclient hook for setting the hostname, updating /etc/hosts, and re-generating ssh keys on Ubuntu. Useful for creating CloudStack templates. See https://issues.apache.org/jira/browse/CLOUDSTACK-4556
#!/bin/sh
# dhclient change hostname script for Ubuntu
# /etc/dhcp/dhclient-exit-hooks.d/sethostname
# logs in /var/log/upstart/network-interface-eth0.log
# for debugging:
echo "sethostname BEGIN"
export
set -x
This file has been truncated, but you can view the full file.
--------------------------------------------------------------------------------
Preparing input task
--------------------------------------------------------------------------------
Input task is:
This file has been truncated, but you can view the full file.
--------------------------------------------------------------------------------
Preparing input task
--------------------------------------------------------------------------------
Input task is:
# Parse results
result = StringIO.StringIO('\n'.join(stdout.split('\n')[1:]))
creader = csv.reader(result)
report = []
for row in creader:
if len(row) >= 1 :
report.append(["single-{}".format(row[1]),row[2]])
report.append(["aggregate-{}".format(row[1]),row[3]])
print report