Skip to content

Instantly share code, notes, and snippets.

View hype08's full-sized avatar

Henry Zhang hype08

View GitHub Profile
@hype08
hype08 / gist-unlocking-the-secrets-of-rails-secrets-and-credentials.md A comprehensive examination of Rails Secrets, Credentials, and Secret Key Base

Unlocking the Secrets of Rails Secrets and Credentials

Interurban Tunnel at Blackhand Gorge- Brian J Bayer


If you are like many (most?) of us, you have encountered Rails Credentials/Secrets and secret_key_base and may have been left a bit (or more) confused.

This post is an attempt to remove some of that confusion by

@hype08
hype08 / main.rs
Created April 30, 2021 21:35
Parsing the command line – the structopt crate
use std::path::PathBuf;
use structopt::StructOpt;
#[derive(StructOpt, Debug)]
struct Opt {
/// Activate verbose mode
#[structopt(short = "v", long = "verbose")]
verbose: bool,
/// File to generate
@hype08
hype08 / cloudSettings
Created July 31, 2020 02:11
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-07-31T02:11:17.481Z","extensionVersion":"v3.4.3"}
@hype08
hype08 / instalike.js
Created January 8, 2020 22:15
instalike
let likesGiven = 0;
setInterval(() => {
let like = document.querySelector('article span.glyphsSpriteHeart__outline__24__grey_9'),
arrow = document.querySelector('a.coreSpriteRightPaginationArrow');
if (like) {
like.click();
likesGiven++
}
arrow.click();
console.log(`You've liked ${likesGiven} post(s)!`);