Skip to content

Instantly share code, notes, and snippets.

View robsonke's full-sized avatar
💭
Hoorray!

Rob Sonke robsonke

💭
Hoorray!
View GitHub Profile
@robsonke
robsonke / checkDockerDisks.sh
Last active February 18, 2024 12:44
This Bash script will loop through all running docker containers on a host and list the disk usage per mount. In case it's breaching the 65%, it will email you.
#!/bin/bash
# get all running docker container names
containers=$(sudo docker ps | awk '{if(NR>1) print $NF}')
host=$(hostname)
# loop through all containers
for container in $containers
do
echo "Container: $container"
on alfred_script(q)
tell application "iTerm"
activate
tell the first terminal
launch session "Default"
tell the last session
-- give the iterm tab the name of the process
set name to q
#!/bin/sh
#
#
# Usage: ./scriptName.sh www.google.com
#
ADDRESS=$1
echo Fetching ssl certificate for $ADDRESS
-- Modified script, based on:
-- http://peterdowns.com/posts/open-iterm-finder-service.html
on run {input, parameters}
tell application "Finder"
set dir_path to quoted form of (POSIX path of (folder of the front window as alias))
end tell
CD_to(dir_path)
end run
@robsonke
robsonke / createTreeStructureFromArray.php
Created June 14, 2014 08:17
Group a php array to a tree structure
$original = array
(
"1" => array
(
"id" => 1,
"type" => "mtb",
"brand" => "scott",
"name" => "scott1"
),
array