Skip to content

Instantly share code, notes, and snippets.

View darkowlzz's full-sized avatar

Sunny darkowlzz

  • ‏‏‏‏‎ ‎
View GitHub Profile
@fiatjaf
fiatjaf / check_sig.go
Last active March 24, 2023 08:36 — forked from lsowen/check_sig.go
GPG signature verification in Go with a bunch of strings
package main [33/492]
import (
"fmt"
"strings"
"golang.org/x/crypto/openpgp"
)
func main() {
@lsowen
lsowen / check_sig.go
Last active November 23, 2023 23:31
GPG Signature Verification in go (with golang.org/x/crypto/openpgp)
package main
import (
"fmt"
"golang.org/x/crypto/openpgp"
"os"
)
func main() {
keyRingReader, err := os.Open("signer-pubkey.asc.txt")
@ryan0x44
ryan0x44 / Terraform-Blue-Green-AWS.md
Created November 19, 2015 21:57
Blue-Green AWS Auto Scaling Deployments with Terraform

A quick note on how I'm currently handling Blue/Green or A/B deployments with Terraform and AWS EC2 Auto Scaling.

In my particular use case, I want to be able to inspect an AMI deployment manually before disabling the previous deployment.

Hopefully someone finds this useful, and if you have and feedback please leave a comment or email me.

Overview

I build my AMI's using Packer and Ansible.

@lavalamp
lavalamp / The Three Go Landmines.markdown
Last active February 16, 2024 12:16
Golang landmines

There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.

All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@Noitidart
Noitidart / _ff-addon-snippet-ObjC_SetApplicationIconImage.js
Last active August 29, 2015 14:11
_ff-addon-snippet-ObjC_SetApplicationIconImage - Change the icon in the dock. (Mac OS X) (js-ctypes)
"use strict";
let { utils: Cu } = Components;
let { ctypes } = Cu.import("resource://gre/modules/ctypes.jsm", {});
let { OS } = Cu.import("resource://gre/modules/osfile.jsm", {});
/* **** please replace following string before run **** */
let IMAGE_PATH = "absolute path to image file";
OS.File.read(IMAGE_PATH).then(function(iconData) {