This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
####################################################### | |
## Simple bash script to change OSX network location ## | |
## based on the wifi network you're connected too. ## | |
## Author: Rob Sonke ## | |
####################################################### | |
# | |
# NOTE: Make sure you add this line to the /etc/sudoers file to allow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# | |
# Usage: ./scriptName.sh www.google.com | |
# | |
ADDRESS=$1 | |
echo Fetching ssl certificate for $ADDRESS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$original = array | |
( | |
"1" => array | |
( | |
"id" => 1, | |
"type" => "mtb", | |
"brand" => "scott", | |
"name" => "scott1" | |
), | |
array |
NewerOlder