Skip to content

Instantly share code, notes, and snippets.

View skplunkerin's full-sized avatar
🐰
Working W02K1N6 01110111 01101111 01110010 01101011 01101001 01101110 01100111

Skplunkerin skplunkerin

🐰
Working W02K1N6 01110111 01101111 01110010 01101011 01101001 01101110 01100111
View GitHub Profile
@skplunkerin
skplunkerin / message.md
Last active December 6, 2023 05:02
rails custom error message validation without column

Best solution:

http://stackoverflow.com/a/808776/1180523

# model
validates   :email,    :uniqueness => { message: "is wrong" }
validates   :name,    :uniqueness => { message: "Your name is wrong" }

HUMANIZED_ATTRIBUTES = {
  :email => "E-mail address",
  :name => "" # don't include column name in error
@skplunkerin
skplunkerin / fix.md
Last active February 21, 2023 20:48
Puma compiled without SSL support (RuntimeError)

When running a Rails project locally that needs SSL support you might get the following type of error:

... Puma compiled without SSL support (RuntimeError)

Here's how to fix it:

SO answer

@skplunkerin
skplunkerin / 0-notes.md
Last active December 27, 2022 17:01
VSCode node debug configurations (.vscode launch.json Node configs)

NOTE: JSON files don't normally allow comments, but VSCode allows them in .vscode/launch.json.

TODO:

  • Add debug config for React/JS-HTML-CSS projects in the browser
@skplunkerin
skplunkerin / ssh-broken-pipe.md
Last active December 16, 2021 02:08
ssh broken pipe fix
@skplunkerin
skplunkerin / HelloWorld...Assignment - MultiSig Wallet...README.md
Last active November 29, 2021 14:02
Multi Sig Wallet Assignment - Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=

Deploy Instructions

  1. Go to https://remix.ethereum.org

  2. Click on the Deploy & run transactions on the left navigation

  3. Choose the MultiSigWallet contract in the CONTRACT dropdown

  4. Paste the following in the Deploy input, then click Deploy:

    ["0x5B38Da6a701c568545dCfcB03FcB875f56beddC4", "0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2", "0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db"], 2
    
@skplunkerin
skplunkerin / HelloWorld...Assignment - MultiSig Wallet...README.md
Last active November 28, 2021 12:18
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=

Project Requirements

– Anyone should be able to deposit ether into the smart contract

– The contract creator should be able to input the following (in the constructor) :

  1. the addresses of the owners
  2. the number of approvals required for a transfer

For example, input 3 addresses and set the approval limit to 2.

@skplunkerin
skplunkerin / data_location-memory_assignment.sol
Last active November 25, 2021 18:30
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// See feedback: https://gist.github.com/skplunkerin/61fe0562a72016162aece7b22609fb62
pragma solidity 0.8.7;
contract MemoryAndStorage {
struct User{
uint id;
uint balance;
}
@skplunkerin
skplunkerin / helloworld.sol
Last active November 23, 2021 23:52
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
pragma solidity 0.8.7;
contract HelloWorld {
// called state variables:
// string message;
// CONSTRUCTORS
// https://academy.moralis.io/lessons/constructors-2
// runs only 1x during compile.
// constructor(string memory _msg){
@skplunkerin
skplunkerin / gsheets.md
Last active May 26, 2021 17:05
google sheets gsheets spreadsheets tips