Skip to content

Instantly share code, notes, and snippets.

@tyndyll
tyndyll / bashpipe.go
Last active August 23, 2024 13:24
Execute Piped Shell Commands in Go
package main
import (
"bytes"
"io"
"log"
"os"
"os/exec"
)
@tyndyll
tyndyll / overcast_download.py
Created September 18, 2014 10:55
Get Source URL from Downcast Link
#!/usr/bin/env python
# Requirements: BeautifulSoup - http://www.crummy.com/software/BeautifulSoup/
# Example:
# overcast_downloader (~) python download.py https://overcast.fm/podcasts/episode/101217043409120
# http://traffic.libsyn.com/oneyoufeed/Mini_Episode_7.mp3#t=0
#
# overcast_downloader (~) python download.py https://overcast.fm/podcasts/episode/101217043409120 | xargs wget
# --2014-09-18 11:53:45-- http://traffic.libsyn.com/oneyoufeed/Mini_Episode_7.mp3
# Resolving traffic.libsyn.com... 204.16.245.39
# Connecting to traffic.libsyn.com|204.16.245.39|:80... connected.
@tyndyll
tyndyll / cheerleader.go
Last active August 29, 2015 14:02
Simple script/binary that prints a message at a prescribed --interval either infinitely or for --count number of times.
// author: tyndyll
// Simple script/binary that prints a message at a prescribed --interval either infinitely or
// for --count number of times.
// It is being used a simple service target for setting up and testing systemd files. To that
// end it handles SIGINT
//
// To use:
//
// ~GOPATH go run src/cheerleader.go --interval 1 --count 1
// I am the cheerleader, I will save the world