Skip to content

Instantly share code, notes, and snippets.

View StephenKing's full-sized avatar

Steffen Gebert StephenKing

View GitHub Profile
@StephenKing
StephenKing / boxstarter-test.ps1
Last active January 23, 2017 09:56
Boxstarter-Test
# Boxstarter options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
cinst powershell
if (Test-PendingReboot) { Invoke-Reboot }
Update-ExecutionPolicy Unrestricted
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowFullPathInTitleBar
@StephenKing
StephenKing / mpls.py
Last active January 23, 2017 09:55
Ryu MPLS app
from ryu.base import app_manager
from ryu.controller import dpset
from ryu.controller import ofp_event
from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofproto_v1_3
from ryu.ofproto import ether
from ryu.lib.packet import packet, ethernet
from time import sleep
@StephenKing
StephenKing / fourier.m
Created November 13, 2014 16:27
Matlab Fourier
%% Matlab-Skript zur Vorlesung Informationsuebertragung am 14.11.2014
% Autor: Valentin Burger, Michael Seufert, Steffen Gebert
clear all; %set(0, 'defaultlinelinewidth', 1);
figure(1);clf;box on;
A=5; % Amplitude
w=4; % Frequenz
phi=pi/2; % Phasenverschiebung
x=(0:0.001:2)*pi;
y=A*sin(x*w+phi);
@StephenKing
StephenKing / reset.sh
Last active November 23, 2016 07:52
Network config reset
#!/bin/sh
##########################################
# Make sure that $FILE.$BACKUP_EXT exists!
# i.e. /etc/network/interfaces.bak
##########################################
FILE=/etc/network/interfaces
BACKUP_EXT=bak
@StephenKing
StephenKing / chef-client.log
Created October 23, 2016 15:11
Installation of dependent plugins
[2016-10-23T16:35:49+02:00] DEBUG: Plugin workflow-support does not seem to be installed
[2016-10-23T16:35:49+02:00] INFO: Installing workflow-support:2.9
[2016-10-23T16:35:49+02:00] DEBUG: Installing plugin dependencies for workflow-support
[2016-10-23T16:35:49+02:00] DEBUG: Reading workflow-api's information from /var/lib/jenkins/plugins/workflow-api.jpi
[2016-10-23T16:35:49+02:00] DEBUG: Content of /var/lib/jenkins/plugins/workflow-api.jpi manifest: Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: svanoort
Build-Jdk: 1.8.0_102
Extension-Name: workflow-api
@StephenKing
StephenKing / GerritSite.css
Created April 13, 2015 20:26
GerritSite.css
/* links */
a,
a:visited {
color: #585858 !important;
text-decoration: none;
}
a:hover {
color: #ff8700 !important;
text-decoration: underline
@StephenKing
StephenKing / Dockerfile
Last active April 14, 2016 15:55
SSL issues in Docker Debian 8
# fails with SSL error
FROM debian:8
# returns HTML content (SSL successful)
# FROM debian:7
# FROM ubuntu:latest
RUN apt-get update
RUN apt-get -y install curl ca-certificates
RUN curl https://akamai.bintray.com
elasticsearch_user 'elasticsearch-logging'
elasticsearch_install 'elasticsearch-logging'
elasticsearch_configure 'elasticsearch-logging'
elasticsearch_service 'elasticsearch-logging' do
service_actions [:enable]
end
git "typoscript-plugin" do
repository "https://gitlab.sgalinski.de/phpstorm/phpstorm-typoscript-plugin.git"
revision "refs/tags/v1.6"
action :sync
end
@StephenKing
StephenKing / Vagrantfile
Last active December 17, 2015 09:19
My Vagrantfile
boxes = [
{
:name => :default,
:ip => '192.168.156.130',
:run_list => '',
# :http_port => '8080',
# :gui => true,
# :memory => 2048,
# :cpus => 4,
},