Skip to content

Instantly share code, notes, and snippets.

G33kNoob /
Created December 15, 2022 00:43 — forked from iscott/
Cheat Sheet: Simple Authentication in Rails 5 with has_secure_password

Cheat Sheet: Simple Authentication in Rails 6 with has_secure_password

The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.

First the simplest/core layers, then optional layers depending on which features/functionality you want.

AUTHOR Ira Herman
LANGUAGE/STACK Ruby on Rails Version 4, 5, or 6
G33kNoob / AES_Example.go
Created July 2, 2022 13:28 — forked from DaaaaanB/AES_Example.go
A quick example of basic AES encryption using the Golang AES library.
* FILE : AES_Example.go
* PROJECT : INFO-1340 - Block Ciphers
* PROGRAMMER : Daniel Pieczewski, ref:
* FIRST VERSION : 2020-04-12
* The function(s) in this file make up example code for encryption and decryption of a block of text
* using the Golang standard library AES implementation using the Cipher Feedback mode of encryption (CFB).
* DISCLAIMER: There is no way that this a secure implementation of AES. This is only for my personal learning.
* So help you God if this ends up in some commercial application.
G33kNoob / sendRawTransaction.js
Created June 12, 2022 01:23 — forked from AndreiD/sendRawTransaction.js
Sends a raw transaction with web3 1.2.2, ethereumjs-tx, and Infura
web3.eth.getTransactionCount(this.address).then(txCount => {
const txData = {
nonce: web3.utils.toHex(txCount),
gasLimit: web3.utils.toHex(100000),
gasPrice: web3.utils.toHex( YOUR_GAS_PRICE), // 10-15 gwei should be ok
to: this.toAddress,
from: this.address,
G33kNoob / sendRawTokenTransaction.js
Created February 7, 2022 01:28 — forked from rajeshsubhankar/sendRawTokenTransaction.js
Create and sends a raw ERC-20 token transaction with ether.js and Infura
const ethers = require('ethers');
const BigNumber = require('bignumber.js');
const provider = new ethers.providers.JsonRpcProvider('');
const addressFrom = 'SENDER_ADDRESS';
const privateKey = 'SENDER_PRIVATE_KEY';
const wallet = new ethers.Wallet(privateKey, provider);
const addressTo = 'RECEIVER_ADDRESS';
G33kNoob /
Created May 16, 2020 04:19 — forked from nikhita/
How to install FiraCode font on Linux
mkdir -p ~/.local/share/fonts
for type in Bold Light Medium Regular Retina; do wget -O ~/.local/share/fonts/FiraCode-$type.ttf "$type.ttf?raw=true"; done
fc-cache -f