Skip to content

Instantly share code, notes, and snippets.

View binarytemple's full-sized avatar

Bryan Hunt binarytemple

  • The mountains of mourne
View GitHub Profile
@karlvr
karlvr / 00README.md
Last active November 26, 2023 14:21
Roadwarrior configuration for macOS 10.12, iOS 10 and Windows 10 using strongSwan and user certificates

strongSwan setup for Road Warriors on macOS 10.12, iOS 10 and Windows 10

This setup is for remote users to connect into an office/home LAN using a VPN (ipsec). This is based on (but not the same as) the strongSwan documentation and this guide: https://raymii.org/s/tutorials/IPSEC_vpn_with_Ubuntu_16.04.html

I used strongSwan 5.5.1.

apt-get install -y strongswan strongswan-pki
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 7, 2024 12:29
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@kevsmith
kevsmith / b2f.erl
Last active November 2, 2021 09:15
Erlang/Elixir BEAM decompiler
#! /usr/bin/env escript
%% -*- mode: erlang -*-
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 ft=erlang et
%%
%% Copyright 2016 Operable, Inc. All Rights Reserved.
%%
%% This file is provided to you under the Apache License,
%% Version 2.0 (the "License"); you may not use this file
@binarytemple
binarytemple / nginx.conf
Created January 5, 2016 14:59 — forked from dctrwatson/nginx.conf
Caching NPM proxy using Nginx
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@binarytemple
binarytemple / convert.ring.file.to.plain.text.markdown
Last active August 29, 2015 14:23
convert ring file to plain text

RingToFile = fun(InputFile,OutputFile) -> 
   {ok,Data} = file:read_file(InputFile),
   T = binary_to_term(Data),
   {ok,Handle} = file:open(OutputFile,[write,append]),
   Line = io_lib:format("~p", [T]),
   file:write(Handle, Line), 
   file:close(Handle)
end.
@slfritchie
slfritchie / scr27.md
Created September 18, 2014 10:01
Tokyo Source code reading #27 notes

Riak Source Code Reading #27: Riak KV backend API and storage

The Riak KV backend store API

behaviour_info(callbacks) ->
    [
     {api_version,0},