Skip to content

Instantly share code, notes, and snippets.

View jepomeroy's full-sized avatar

Jon Pomeroy jepomeroy

  • Albuquerque, New Mexico, USA
View GitHub Profile
@jepomeroy
jepomeroy / multiple-github-accounts-and-ssh-keys.md
Last active November 26, 2023 20:37
Multiple GitHub accounts and 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.
@jepomeroy
jepomeroy / server.py
Created September 27, 2022 16:29
HTTP test server
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from http.server import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@jepomeroy
jepomeroy / default.conf
Last active April 30, 2019 17:34
nginx default setup for HTTPS and p12 cert.
upstream wildfly {
server <IPADDR>:8080;
}
server {
listen 80;
server_name <DNSNAME>;
if ($host = server_name) {
return 301 https://$server_name$request_uri;
@jepomeroy
jepomeroy / extract-testflight.js
Created March 13, 2017 22:18 — forked from creaoy/extract-testflight.js
Extract TestFlight user email addresses from iTunes Connect
//Make sure you scroll down to get all data loaded
var text = '';
$('.col-email').each(function(index,el) {
if (index == 0) {
text = 'Email, First Name, Last Name\n';
}
else {
//Email
text = text + $.trim($(el).find("a").text()) + ',';
//First Name