Skip to content

Instantly share code, notes, and snippets.

@studious
studious / 2019-https-localhost.md
Created January 8, 2021 01:17 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@studious
studious / ssl_puma.sh
Last active March 29, 2019 04:52 — forked from tadast/ssl_puma.sh
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@studious
studious / build.sh
Created August 1, 2016 13:16
Test scaffold for Rails project built with components
#!/bin/bash
result=0
cd "$( dirname "${BASH_SOURCE[0]}" )"
for test_script in $(find . -name test.sh); do
pushd `dirname $test_script` > /dev/null
./test.sh
result+=$?
@studious
studious / gist:a24ef16d11fbfc8298b6
Created December 15, 2015 00:57 — forked from sl4m/gist:5091803
create self-signed certificate for localhost
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
All of these resources were extremely valuable as I researched regex, finite state machines, and regex in Ruby. Check them out, they're full of fantastic information!
Articles
"Exploring Ruby's Regular Expression Algorithm" by Pat Shaughnessy
http://patshaughnessy.net/2012/4/3/exploring-rubys-regular-expression-algorithm
"Finite State Machines and Regular Expressions" by Eli Bendersky
http://www.gamedev.net/page/resources/_/technical/general-programming/finite-state-machines-and-regular-expressions-r3176
"Regular Expression Matching Can Be Simple and Fast" by Russ Cox