Skip to content

Instantly share code, notes, and snippets.

View AustineA's full-sized avatar
🎯
Focusing

Austine A. AustineA

🎯
Focusing
View GitHub Profile
@AustineA
AustineA / sha256-hmac.md
Created July 25, 2020 07:26 — forked from jasny/sha256-hmac.md
Hashing examples in different languages

Example inputs:

Variable Value
key the shared secret key here
message the message to hash here

Reference outputs for example inputs above:

| Type | Hash |

@AustineA
AustineA / Production Deployment Commands Ubuntu 18.04
Created March 31, 2020 18:34 — forked from Deanout/Production Deployment Commands Ubuntu 18.04
Deploy to production with nginx, passenger, capistrano, rails 6
These commands are meant to be followed in conjunction with:
https://www.youtube.com/watch?v=xpYpaRUFzTI
https://gorails.com/deploy/ubuntu/18.04
ssh root@1.2.3.4
adduser deploy
adduser deploy sudo
exit
ssh-copy-id root@1.2.3.4
ssh-copy-id deploy@1.2.3.4
@AustineA
AustineA / rails http status codes
Created July 7, 2019 19:20 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@AustineA
AustineA / remove_checkout_fields.php
Created April 26, 2018 20:11 — forked from cryptexvinci/remove_checkout_fields.php
Remove fields from WooCommerce checkout page.
add_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' );
function custom_remove_woo_checkout_fields( $fields ) {
// remove billing fields
unset($fields['billing']['billing_first_name']);
unset($fields['billing']['billing_last_name']);
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_address_1']);
unset($fields['billing']['billing_address_2']);
@AustineA
AustineA / slidespage.html
Created March 26, 2018 19:49 — forked from aarjithn/slidespage.html
Sliding Segments Ionic v2
<ion-toolbar>
<ion-segment [(ngModel)]="selectedSegment" (ionChange)="onSegmentChanged($event)">
<ion-segment-button value="first">
First
</ion-segment-button>
<ion-segment-button value="second">
Second
</ion-segment-button>
<ion-segment-button value="third">
Third
@AustineA
AustineA / cloud9-setup.sh
Created February 6, 2018 23:07 — forked from thibaudgg/cloud9-setup.sh
Rails 5: The Tour - Step by Step
#!/bin/sh
# Clean workspace
rm -rf *
rm .gitignore
# Upgrade Ruby
rvm install ruby-2.4.1 --default
# Start PostgreSQL and fix encoding conflict when creating database

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps

@AustineA
AustineA / 0_reuse_code.js
Created April 6, 2017 07:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console