Skip to content

Instantly share code, notes, and snippets.

@cookandy
cookandy / checkValidator.sh
Created February 21, 2023 00:04
Check ETH validator withdrawal against CLWP repo
#!/bin/bash
# usage ./checkValidator <space separated list of validators>
NOT_FOUND="Not Found"
if [ $# -eq 0 ]
then
echo "You must provide at least one argument. \n Use with ./clwpCheck.sh <validator1Index> <validator2Index> ..."
fi
@cookandy
cookandy / lastfm-to-slack.sh
Last active March 3, 2022 17:02
last.fm to Slack
#!/bin/bash
# this script updates your slack status with the current playing track from last.fm
# requires URI::Escape perl module (cpan URI::Escape) and jq
# make sure to update slack_api_key, last_fm_api_key, and last_fm_username
#########################################
##### to run this script at startup #####
#########################################
# save this script to /Users/<your_user>/Library/scripts/lastfm-to-slack.sh
#!/usr/bin/env bash
list=( $(docker-machine ls | grep Running | awk '{ print $1 }') )
for i in "${list[@]}"; do
ip=$(docker-machine ip $i)
#remove line matching ip
sudo sed -i '' '/'$ip'/d' /etc/hosts
#insert ip/host on last line
sudo sed -i -e '$a\
@cookandy
cookandy / spotify-to-slack.sh
Last active February 15, 2019 00:29
Spotfiy to Slack
#!/bin/bash
# this script updates your slack status with the current playing track in spotify in OS X
#########################################
##### to run this script at startup #####
#########################################
# create a com.user.spotifyToSlack.plist file containing the following xml
# make sure to update the /path/to/your/spotify-to-slack.sh in the file
# also update the xoxp-xxxxx to your real slack token