Skip to content

Instantly share code, notes, and snippets.

View kcoyner's full-sized avatar

Kevin Coyner kcoyner

View GitHub Profile
@svenvarkel
svenvarkel / aws_ec2_nginx_certbot_autorenew.sh
Last active January 16, 2019 23:36
This script renews the LetsEncrypt certificates in a firewalled EC2 machine inside AWS VPC
#!/usr/bin/env bash
#
# This script would help to automate renewal of LetsEncrypt TLS certificates in a Linux machine
# running nginx web server on AWS EC2.
# What it does:
# 1. it stops nginx
# 2. it opens incoming firewall ports 80 and 443 for certbot host verification
# 3. it runs certbot to renew certificates. Certbot launches a standalone HTTP server on port 80 or 443
# 4. it closes incoming firewall ports 80 and 443
# 5. it starts nginx

Introduction to Higher-Order Functions

Lessons

Slides 1

Slides 2

Two Forms of Functions

Introduction to Objects

Lesson

Slides

Exercises

Basic Requirements

Array Iteration with while & for

Lesson

Slides

Exercises

Try to write all of the exercises using both the for loop and while loop.

Introduction to Arrays

Lesson

Slides

Exercises

Basic Requirements

@mapmeld
mapmeld / OverEncrypt.md
Last active July 25, 2023 18:55
OverEncrypt - paranoid HTTPS

OverEncrypt

This is a guide that I wrote to improve the default security of my website https://fortran.io , which has a certificate from LetsEncrypt. I'm choosing to improve HTTPS security and transparency without consideration for legacy browser support.

WARNING: if you mess up settings, lose your certificates, or decide to no longer maintain HTTPS certs, these steps can and will make your domain inaccessible.

I would recommend these steps only if you have a specific need for information security, privacy, and trust with your users, and/or maintain a separate secure.example.com domain which won't mess up your main site. If you've been thinking about hosting a site on Tor, then this might be a good option, too.

The best resources that I've found for explaining these steps are https://https.cio.gov , https://certificate-transparency.org , and https://twitter.com/konklone

@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@ryanflorence
ryanflorence / static_server.js
Last active July 21, 2024 12:43
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);