Skip to content

Instantly share code, notes, and snippets.

View agxs's full-sized avatar

Andrew Seales agxs

  • EDINA, University of Edinburgh
  • Edinburgh
View GitHub Profile
@agxs
agxs / gist:0049167d54f9aa9c9488c540b34c42d2
Created September 24, 2024 11:42
Delete statefulsets from a namespace
#!/bin/bash
# Ensure kubectl is installed
if ! command -v kubectl &> /dev/null; then
echo "Error: kubectl is not installed. Please install it and try again."
exit 1
fi
# List all namespaces
namespaces=($(kubectl get namespaces -o jsonpath='{.items[*].metadata.name}'))
Jul 03 14:42:28 as-swarm-manager dockerd[25595]: time="2017-07-03T15:42:28+01:00" level=info msg="time=\"2017-07-03T14:42:28Z\" level=debug msg=\"/VolumeDriver.Capabilities\" host=\"unix:///var/run/libstorage/123615540.sock\" pluginResponse={ map[]} time=1499092948304 " plugin=98f0aacacd60baa40de8e5aa3fc51cf29ec8d0fae7c5e01812b1e00fcb34e041
Jul 03 14:42:28 as-swarm-manager dockerd[25595]: time="2017-07-03T15:42:28+01:00" level=info msg="time=\"2017-07-03T14:42:28Z\" level=debug msg=\"/VolumeDriver.Capabilities\" host=\"unix:///var/run/libstorage/123615540.sock\" pluginResponse={ map[]} time=1499092948305 " plugin=98f0aacacd60baa40de8e5aa3fc51cf29ec8d0fae7c5e01812b1e00fcb34e041
Jul 03 14:42:28 as-swarm-manager dockerd[25595]: time="2017-07-03T15:42:28+01:00" level=info msg="time=\"2017-07-03T14:42:28Z\" level=debug msg=\"/VolumeDriver.Get\" host=\"unix:///var/run/libstorage/123615540.sock\" pluginResponse={test-vol-1 map[]} time=1499092948305 " plugin=98f0aacacd60baa40de8e5aa3fc51cf29ec8d0fae7c5e01812b1e00fcb3
@agxs
agxs / gist:3864360
Created October 10, 2012 09:31
Perl Apache Analyser
#!/usr/bin/env perl
use strict;
use warnings;
use POSIX;
use File::Glob;
use Devel::Size qw( size total_size );
use v5.12;
my @filenames = glob('./logs/*'); #("./access_log.2012-10-06.gz");
@agxs
agxs / gist:3818265
Created October 2, 2012 11:16
Eclipse Ini File
-vm
/usr/lib/jvm/java-6-sun/jre/lib/amd64/server/libjvm.so
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505
-product
com.springsource.sts.ide
--launcher.defaultAction
openFile
@agxs
agxs / gist:3288999
Created August 7, 2012 20:21
readme

This is a project to test entity systems using XNA and C#.

@agxs
agxs / gist:2965079
Created June 21, 2012 10:44
Apache2 Worker Config For Dave
<IfModule mpm_worker_module>
StartServers 1
MinSpareThreads 5
MaxSpareThreads 10
ThreadLimit 50
ThreadsPerChild 10
MaxClients 10
MaxRequestsPerChild 10000
</IfModule>
@agxs
agxs / gist:2645074
Created May 9, 2012 14:51
Zsh Prompt
if [ "$(whoami)" = "root" ]; then USERCOLOUR="red"; else USERCOLOUR="green"; fi
PROMPT=$'%{$fg[$USERCOLOUR]%}%n%{$fg[green]%}@%m: %{$reset_color%}%{$fg[blue]%}%
/%{$reset_color%}
%{$fg_bold[red]%}✗ %{$reset_color%} '
local return_code="%(?..%{$fg_bold[red]%}:( %?%{$reset_color%})"
RPROMPT='${return_code} $(git_prompt_info)'