Skip to content

Instantly share code, notes, and snippets.

@swarminglogic
swarminglogic / vlcopen.sh
Last active December 13, 2018 22:25
Download video URL (youtube-dl supported), and automatically open with VLC as soon as possible. Assign to global hotkey for easy use: (1. Copy URL. 2. Hit hotkey shortcut. 3. Wait a few seconds. 4. Enjoy in VLC)
#!/bin/bash
if [ $# -eq 1 ] ; then
path=$1
else
clipboard=$(xclip -selection clipboard -o)
if [ $(<<<$clipboard grep -P "^http") ] ; then
path=$clipboard
else
if [ -t 1 ] ; then
@thcipriani
thcipriani / dynnds
Last active August 29, 2015 14:01
dyndns
#!/usr/bin/env python
# http://blog.vrypan.net/2012/12/20/dynamic-dns-with-route53/
from area53 import route53
from boto.route53.exception import DNSServerError
import subprocess
import sys
def get_ip():
p = subprocess.Popen("/usr/bin/dig +short @resolver1.opendns.com myip.opendns.com", stdout=subprocess.PIPE, shell=True)
(output, err) = p.communicate()
@natelandau
natelandau / .bash_profile
Last active April 30, 2024 18:07
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@swarminglogic
swarminglogic / watchfile.sh
Last active March 4, 2024 14:44
watchfile - monitor file(s) and execute a command when files are changed
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------