Skip to content

Instantly share code, notes, and snippets.

View kristinn's full-sized avatar
🤡

Kristinn Örn Sigurðsson kristinn

🤡
  • Iceland
  • 21:30 (UTC)
View GitHub Profile
@kristinn
kristinn / 1-setup.md
Created October 28, 2022 16:02 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS

Methods of Signing with a GPG Key on MacOS

Last updated September 21, 2022

This Gist explains how to do this using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

There has been a number of comments on this gist regarding some issues around the pinentry-program and M1 Macs. I've finally gotten a chance to try things out on an M1 and I've updated the documentation in 2-using-gpg.md to reflect my findings.

@kristinn
kristinn / docker-compose.yml
Created May 17, 2022 14:32 — forked from tomasfejfar/docker-compose.yml
Using YAML to reuse parts of existing docker-compose configuration
version: "3"
services:
apache: &apacheConfig
build: .
volumes:
- ./:/var/www/html:cached
- ./docker/php-apache/php.ini:/usr/local/etc/php/php.ini
- ./docker/php-apache/ssl-local:/etc/httpd/ssl
working_dir: /var/www/html
ports:

Keybase proof

I hereby claim:

  • I am kristinn on github.
  • I am kristinnsig (https://keybase.io/kristinnsig) on keybase.
  • I have a public key ASDedRpvxSe-jx2WZLQu_56CdTpK0Wq5h57BNPGWMTaV_Ao

To claim this, I am signing this object:

@kristinn
kristinn / signal.go
Created October 20, 2017 12:39 — forked from reiki4040/signal.go
signal handling example for golang
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
)
func main() {
@kristinn
kristinn / key_repeat.sh
Created October 17, 2017 08:35
macOS key repeat rate
defaults write -g InitialKeyRepeat -int 15 # default value is 20
defaults write -g KeyRepeat -int 1 # default value is 2
@kristinn
kristinn / USING-VAULT.md
Created April 12, 2017 13:31 — forked from voxxit/USING-VAULT.md
Consul + Vault + MySQL = <3
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200

Initializing a vault:

vault init
@kristinn
kristinn / subprocess.py
Created June 12, 2016 21:50 — forked from thomasballinger/subprocess.py
Using a pseudo-terminal to interact with interactive Python in a subprocess
from subprocess import Popen, PIPE
import pty
import os
from select import select
import sys
import tty
master, slave = pty.openpty()
p = Popen(['python'], stdin=slave, stdout=PIPE, stderr=PIPE)
pin = os.fdopen(master, 'w')
@kristinn
kristinn / install_latest_docker.sh
Created December 12, 2015 16:11 — forked from parente/install_latest_docker.sh
Install Docker latest on Ubuntu 14.04 with AUFS as the storage driver
#!/bin/bash
sudo apt-get update
sudo apt-get -y install linux-image-extra-$(uname -r)
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get -y install lxc-docker
@kristinn
kristinn / slack_delete.rb
Created December 11, 2015 12:57 — forked from jamescmartinez/slack_delete.rb
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
#rsyslog v3 config file
# if you experience problems, check
# http://www.rsyslog.com/troubleshoot for assistance
#### MODULES ####
# Provides UDP syslog reception
$ModLoad imudp.so
$UDPServerRun 514