Skip to content

Instantly share code, notes, and snippets.

@tsprlng
tsprlng / README.md
Created April 4, 2018 19:39
Working around the pain of moving from aws_security_group with ingress/egress to aws_security_group_rules in Terraform

In Terraform you might want to replace ingress/egress rules directly on an aws_security_group with individual aws_security_group_rules, so that they work properly.

To do this, first make the required *.tf changes. Great. Now the plan contains only rule additions, and application fails due to the collision with the undeleted old rules.

    terraform state rm aws_security_group.the_sg
    terraform import aws_security_group.the_sg sg-deadbeef

Great. Now it's imported a bunch of aws_security_group_rules called aws_security_group_rule.the_sg and aws_security_group_rule.the_sg-1 up to -whatever, rather than the aws_security_group_rule.descriptive_name you wanted.

@DomSless
DomSless / KodiSendURL.html
Last active September 15, 2021 20:48
Quick, Dirty 'n' Hacky Method to Send Video URL's to Kodi/XBMC
<!DOCTYPE html>
<html lang=”en”>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</head>
<body>
Enter URL:
<input type="text" style="width: 300px;" value="http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi">
<button>Send..</button>
</br></br>
@tsprlng
tsprlng / README
Created April 4, 2012 00:48
The Pysh Language
This is a Pysh script based on an 'idealized' partial re-implementation of my uta utility.
Pysh will basically be a language (or set of ugly macros) for quickly hacking shell-scripty tasks in Python.
Theoretically you get the luxury of Python idioms like generators, context managers, and meaningful whitespace, with the flexibility to hurl data between other programs in various convenient ways that don't involve Popen.
All the best languages have quirky special characters, right? (It's not like Perl, I promise.)
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh