Skip to content

Instantly share code, notes, and snippets.

Martin martinseener

View GitHub Profile
View kcov xcodebuild
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- works
@martinseener
martinseener / gist:98d2690d48895be25d0f
Created Jan 5, 2016 — forked from brenes/gist:bfaf3aad4d456e9063a0
Installing ruby stuff on Debian Jessie
View gist:98d2690d48895be25d0f
* First: Install libxml2 through RVM
rvm pkg install libxml2
* Then: Configure libxml in bundle
bundle config build.libxml-ruby \
--with-xml2-lib=${HOME}/.rvm/usr/lib \
--with-xml2-include=${HOME}/.rvm/usr/include/libxml2
@martinseener
martinseener / check_freak.sh
Last active Jul 26, 2018
check_freak.sh - A simple nagios-compatible check for the FREAK vulnerability (CVE 2015-0204)
View check_freak.sh
#!/usr/bin/env bash
# check_freak.sh
# (c) 2015 Martin Seener
# Simple script which checks SSL/TLS services for the FREAK vulnerability (CVE 2015-0204)
# It will output if the checked host is vulnerable and returns the right exit code
# so it can also be used as a nagios check!
PROGNAME=$(basename $0)
View keybase.md

Keybase proof

I hereby claim:

  • I am martinseener on github.
  • I am martinseener (https://keybase.io/martinseener) on keybase.
  • I have a public key whose fingerprint is 14EE 1425 C1E1 BC77 4089 65DD BE1D 4C25 0CC8 311A

To claim this, I am signing this object:

@martinseener
martinseener / shellshock_patcher_sh
Last active Aug 29, 2015
Shellshock Bash Patcher for Debian/Ubuntu (Rundeck-compatible)
View shellshock_patcher_sh
#!/bin/bash
env x='() { :;}; echo vulnerable' bash -c "echo this is a test" | grep vulnerable > /dev/null 2>&1
if [ $? -eq 1 ]; then
echo "Not vulnerable. Machine is safe."
exit 0
else
echo -n "Vulnerable. Version: "
/bin/bash --version
echo "Installing patch."
@martinseener
martinseener / postgresql_9.1_to_9.3_on_ubuntu_debian
Last active Mar 14, 2017 — forked from mdpatrick/postgresql_9.1_to_9.3_on_ubuntu_12.04
Small pg_upgrade HowTo for Debian and Ubuntu for PG 9.1 to 9.3 (also works for other versions as well)
View postgresql_9.1_to_9.3_on_ubuntu_debian
# Probably excessive, but it makes these instructions simpler
sudo -i
# Add postgresql repo and update apt listing
echo "deb http://apt.postgresql.org/pub/repos/apt/ squeeze-pgdg main" > /etc/apt/sources.list.d/pgdg.
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt-get update
# For some reason this is necessary with PostgreSQL on Ubuntu 12.04
update-alternatives --remove postmaster.1.gz /usr/share/postgresql/9.1/man/man1/postmaster.1.gz
@martinseener
martinseener / axwayactivator.sh
Created Aug 7, 2014
Axway Synchrony Activator Linux/Unix SysVinit Script v1.0
View axwayactivator.sh
#!/bin/bash
### BEGIN INIT INFO
# Provides: axwayactivator
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start / Stop / Restart / Status Axway Synchrony Activator
# Description: starts, stops, restarts or shows status of an Axway Synchrony Activator installation
### END INIT INFO
@martinseener
martinseener / rork.sh
Created Jun 25, 2014
RORK (Redmine Orphaned Repositories Killer)
View rork.sh
#!/usr/bin/env bash
# Rork v.0.1 (Redmine Orphaned Repositories Killer)
# (c) 2014 Martin Seener (martin@seener.de)
# Deletes orphaned Redmine Repositories which cannot be deleted from within Redmine
# Usage: You only need the original path to the repository. The rest will be handled by this tool.
# Attention: This tool must be run from the "postgres" user, because it does not handle authentication yet.
@martinseener
martinseener / modx-revolution-upgrade.php
Created May 13, 2014
MODX Revolution Quick Upgrade PHP-CLI Script
View modx-revolution-upgrade.php
<?php
if ( !shell_exec("type type")) { echo "Weak your PHP powers are, Luke."; die; }
exec('wget -O latest.zip http://modx.com/download/latest;');
exec('unzip latest.zip; rm latest.zip;');
exec('cd modx-*; cp -r ./* ../; cd ..; rm -R modx-*;');
exec('chmod 660 ./core/config/config.inc.php');
echo("Done. Now call /setup of your MODX installation to complete the Upgrade!");
?>
@martinseener
martinseener / modx-revolution-backup.php
Created May 13, 2014
MODX Revolution Quick File and DB Backup PHP-CLI Script
View modx-revolution-backup.php
<?php
if ( !shell_exec("type type")) { echo "Weak your PHP powers are, Luke."; die; }
$dir = "../backup"; /* Verzeichnis außerhalb des Webroot */
$configFile = "./core/config/config.inc.php";
if (file_exists($configFile)) {
include($configFile);
$date = date("Ymd-His");
$targetSql = "$dir/{$date}_mysql.sql";
$targetTar = "$dir/{$date}_files.tar";
system("mkdir $dir");
You can’t perform that action at this time.