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 / 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 / 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 / if_exists.md
Created October 21, 2020 21:27
golang empty struct{} uses less memory, perfect for if exists ok checks

An empty struct struct{} uses 0 memory:

More on it here https://dave.cheney.net/2014/03/25/the-empty-struct.

It can be used with channels as well if you just want to notify whatever is listening on a channel that something happened and not to transfer data between goroutines.

// DO NOT DO THIS: (it uses more memory)
func removeDuplicateUsers(users []User) []User {
	u := map[string]bool{}
@skplunkerin
skplunkerin / phone.md
Created September 8, 2020 12:53
fake test phone numbers

Source

Only 555-0100 through 555-0199 are now specifically reserved for fictional use; the other numbers have been reserved for actual assignment.

@skplunkerin
skplunkerin / delve.md
Last active July 3, 2020 17:13
vscode delve dlv breaking debug mode debugger

VS Code GO - Delve error:

NOTE: /.../ is the full path to my project.

Error message:

could not launch process: open /.../cmd/server/debug.test: no such file or directory
could not remove /.../cmd/server/debug.test: remove /.../cmd/server/debug.test: no such file or directory
Process exiting with code: 1