Skip to content

Instantly share code, notes, and snippets.

View cice's full-sized avatar
🏠
Working from home

Marian Theisen cice

🏠
Working from home
  • Cisco Systems
  • Düsseldorf, Germany
  • X @em_tyson
View GitHub Profile
@cice
cice / pre-commit
Last active March 9, 2023 08:28 — forked from athiththan11/pre-commit
Git Pre Commit Hook for FIXME TODO
#!/bin/sh
# An hook script to verify changes to be committed do not contain
# any 'DONTCOMMIT:' comments. Called by "git commit" with no arguments.
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it stops the commit.
#
# To bypass this hook, use the "--no-verify" parameter when committing.
# Redirect output to stderr.
@cice
cice / book_bloc.rb
Last active April 6, 2022 06:36
Slot booking script for superbloc.nrw
# frozen_string_literal: true
# Usage:
# Install required gems:
#
# gem install rest-client
# gem install activesupport
# gem install awesome_print
#
# Add your data in MY_DATA, maybe change the tariff (TARIFF_ID[:usc]), then run
class QuitWhenEmpty
def initialize(options = nil)
end
def call(worker, msg, queue)
yield
stop_disposible_worker_if_queue_empty!
end
def stop_disposible_worker_if_queue_empty!
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
apt-get update -y
echo grub-pc hold | sudo dpkg --set-selections
apt-get upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
apt-get install -y apt-transport-https ca-certificates curl software-properties-common pv
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update -y
@cice
cice / zshrc
Last active April 6, 2018 07:23
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/home/docker/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/home/vagrant/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
/etc/apt/sources.list.d/newrelic.list:deb http://apt.newrelic.com/debian/ newrelic non-free
/etc/apt/sources.list.d/webmin.list:deb http://download.webmin.com/download/repository sarge contrib
/etc/apt/sources.list.d/webmin.list:deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
/etc/apt/sources.list:deb http://mirror.hetzner.de/ubuntu/packages precise main restricted universe multiverse
/etc/apt/sources.list:deb http://mirror.hetzner.de/ubuntu/packages precise-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://mirror.hetzner.de/ubuntu/packages precise-updates main restricted universe multiverse
/etc/apt/sources.list:deb http://mirror.hetzner.de/ubuntu/security precise-security main restricted universe multiverse
Resolving dependencies...
The following NEW packages will be installed:
libterm-readkey-perl{a} linux-headers-3.2.0-45{a} linux-headers-3.2.0-45-generic{a} linux-image-3.2.0-45-generic{a}
The following packages will be upgraded:
isc-dhcp-client isc-dhcp-common libcups2 libcupsimage2 libgnutls26 libmysqlclient-dev libmysqlclient18 libplymouth2 libpulse0 libx11-6 libx11-data libx11-dev libx11-doc
libxcb-render0 libxcb-render0-dev libxcb-shm0 libxcb-shm0-dev libxcb1 libxcb1-dev libxcursor-dev libxcursor1 libxext-dev libxext6 libxfixes-dev libxfixes3 libxi-dev libxi6
libxinerama-dev libxinerama1 libxrandr-dev libxrandr2 libxrender-dev libxrender1 libxt-dev libxt6 libxtst6 linux-generic linux-headers-generic linux-image-generic linux-libc-dev
mysql-client mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5 plymouth plymouth-theme-ubuntu-text python-apt
python-apt-common rsyslog
52 packages upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
@cice
cice / cookie_steps.rb
Created June 22, 2011 13:37 — forked from nruth/cookie_steps.rb
Testing login "remember me" feature with Capybara (rack::test or selenium) - deleting the session cookie (only)