Skip to content

Instantly share code, notes, and snippets.

View developerfred's full-sized avatar
🥇
🔥

codingsh developerfred

🥇
🔥
View GitHub Profile
@gcv
gcv / rust_nightly.rb
Created January 26, 2015 18:10
Homebrew formula for installing the official Rust nightly binary build. Useful because: (1) the `rust.rb` formula in Homebrew does not currently install Crate, and (2) the official binary `.pkg` pollutes `/usr/local`. This formula respects Homebrew's installation directory.
class RustNightly < Formula
url "https://static.rust-lang.org/dist/rust-nightly-x86_64-apple-darwin.pkg", using: :nounzip
homepage "http://www.rust-lang.org"
sha1 ""
version Date.today.to_s
def install
system "pkgutil --expand rust-nightly-x86_64-apple-darwin.pkg rn"
@gane5h
gane5h / MKR_holders.csv
Created November 30, 2019 23:01
MKR balance storage slot writes
We can't make this file beautiful and searchable because it's too large.
"block_signed_at","address","balance"
"2019-11-30 21:43:30+00","2d1d6d5deae5cc68d893a73781dd573fde302796",1227556400000000000
"2019-11-30 21:43:30+00","2b5634c42055806a59e9107ed44d43c426e58258",239060270600000000000
"2019-11-30 21:33:10+00","39755357759ce0d7f32dc8dc45414cca409ae24e",437140390807426204185
"2019-11-30 21:33:10+00","69076e44a9c70a67d5b79d95795aba299083c275",5878988991879486728884
"2019-11-30 21:33:10+00","e54365c85ca9b7e3ef68c5bed244dc10330bb264",0
"2019-11-30 21:32:32+00","ac8d6652067ca9b33bd15eeeeb01102d2d2cfc64",843100000000000000
"2019-11-30 21:29:27+00","2c4bd064b998838076fa341a83d007fc2fa50957",2964877658410763648961
"2019-11-30 21:29:27+00","9ba4ae48b8ca9e98e511b3371a4d454d1a3e1003",0
"2019-11-30 21:17:29+00","6cc5f688a315f3dc28a7781717a9a798a59fda7b",2633319886385353620901
@derhuerst
derhuerst / install.md
Last active June 6, 2021 18:02
Rust WASM setup on macOS (with fish shell)
@developerfred
developerfred / mac.md
Last active September 6, 2021 21:24
How to Delete ALL node_modules folders on your machine and Free up HD space!

List Files

$ cd development_folder
$ find . -name "node_modules" -type d -prune | xargs du -chs

10G total

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {ERC721A} from "erc721a/contracts/ERC721A.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
error MintLimitExceeded();
contract SampleNFT is ERC721A, Ownable {
uint256 public constant MINT_LIMIT = 10;
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
// Used in the `name()` function
// "Yul Token"
bytes32 constant nameLength = 0x0000000000000000000000000000000000000000000000000000000000000009;
bytes32 constant nameData = 0x59756c20546f6b656e0000000000000000000000000000000000000000000000;
// Used in the `symbol()` function
// "YUL"
@patybastos
patybastos / oportunidades_codeminer42.md
Last active June 6, 2023 13:24
[Diversos] Vagas para Back-end e Front-end na Codeminer42

Descrição da vaga


Buscamos developers para atuar em diversos projetos, inclusive projetos internacionais com clientes estrangeiros. Temos diversos projetos, com diversos frameworks e tecnologias, então entre em contato. Estamos procurando pessoas de todo os níveis para fazer parte de nosso time, sem diferenças nem preferências. Todos são bem vindos.

Local


A Codeminer42 está presente atualmente em mais de 10 locais do país. Temos vagas para todos eles.

@vsouza
vsouza / .bashrc
Last active April 9, 2024 05:27
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@posener
posener / go-table-driven-tests-parallel.md
Last active April 30, 2024 20:34
Be Careful with Table Driven Tests and t.Parallel()

Be Careful with Table Driven Tests and t.Parallel()

We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.

Let’s create our table driven test, for convenience, I chose to use t.Log as the test function. Notice that we don't have any assertion in this test, it is not needed to for the demonstration.

func TestTLog(t *testing.T) {
	t.Parallel()