Skip to content

Instantly share code, notes, and snippets.

View tam7t's full-sized avatar
🐶
woof

Tommy Murphy tam7t

🐶
woof
View GitHub Profile
apt-get update && apt-get install -y --no-install-recommends \
wget
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -
echo "deb http://apt.llvm.org/jessie/ llvm-toolchain-jessie-4.0 main
deb-src http://apt.llvm.org/jessie/ llvm-toolchain-jessie-4.0 main" >> /etc/apt/sources.list
apt-get update && apt-get install -y --no-install-recommends \
clang-4.0 \
foobar
@tam7t
tam7t / docker-compose.yml
Last active May 18, 2017 14:53
drone-gogs compose
gogs:
image: gogs/gogs:latest
ports:
- "3000:3000"
- "10022:22"
volumes:
- ./data:/data
drone:
image: drone/drone:0.4
# build: .
@tam7t
tam7t / vault-statsd-mapping.conf
Last active November 5, 2020 13:45
Example vault statsd prometheus exporter mapping
vault.barrier.*
name="vault_barrier"
method="$1"
vault.consul.*
name="vault_consul"
method="$1"
vault.route.*.*
name="vault_route"
@tam7t
tam7t / cloudbuild.yaml
Last active March 17, 2022 18:45
Access Google Secret Manager from Cloud Build step
# Usage: gcloud builds submit --no-source
#
# Remember to first grant the cloud build service account permissions to access
# secret 'foo'
#
# gcloud beta secrets add-iam-policy-binding foo \
# --member=serviceAccount:<project-number>@cloudbuild.gserviceaccount.com \
# --role=roles/secretmanager.secretAccessor
steps:
# fetch the secret and write to a volume
@tam7t
tam7t / gist:86eb4793e8ecf3f55037
Last active April 14, 2022 10:57
Securing Ruby's OpenSSL

Are your Ruby HTTPS API calls secure?

Let's check:

2.0.0-p481 :001 > OpenSSL::SSL::SSLContext::DEFAULT_PARAMS
 => {:ssl_version=>"SSLv23", :verify_mode=>1, :ciphers=>"ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW", :options=>-2147482625}
2.0.0-p481 :002 > rating = JSON.parse(RestClient::Resource.new("https://www.howsmyssl.com/a/check" ).get)['rating']
 => "Bad"
@tam7t
tam7t / go.mod
Last active May 20, 2022 17:46
grpd-status-demo
module github.com/tam7t/grpc-demo
go 1.17
require (
google.golang.org/grpc v1.40.0
google.golang.org/grpc/examples v0.0.0-20220215234149-ec717cad7395
)
require (
@tam7t
tam7t / com.obsproject.Studio.Plugin.backgroundremoval.metainfo.xml
Last active October 24, 2022 17:38
obs-backgroundremover v0.4.0 flatpak
<?xml version="1.0" encoding="UTF-8"?>
<component type="addon">
<id>com.obsproject.Studio.Plugin.backgroundremoval</id>
<extends>com.obsproject.Studio</extends>
<name>obs-backgroundremoval Plugin</name>
<summary> An OBS plugin for removing background in portrait images (video), making it easy to replace the background when screen recording.</summary>
<url type="homepage">https://github.com/royshil/obs-backgroundremoval</url>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT</project_license>
</component>
@tam7t
tam7t / tlsprox.go
Created April 26, 2015 22:02
Minimal TLS MITM transparent proxy
/* tlsprox - minimal tls MITM transparent proxy... in go!
* by @tam7t
*
* Usage:
* If we want to MITM https://example.com first get example.com's ip address
* then add localhost to /etc/hosts:
*
* 127.0.0.1 example.com
*
* > go build tlsprox.go
@tam7t
tam7t / certdump.go
Created September 1, 2016 19:02
certdump consul-template plugin for writing vault-generated certificates to separate files
package main
import (
"io/ioutil"
"log"
"os"
"os/user"
"strconv"
)