Skip to content

Instantly share code, notes, and snippets.

View justaguywhocodes's full-sized avatar

Toussaint Louverture justaguywhocodes

View GitHub Profile
@justaguywhocodes
justaguywhocodes / mac.sh
Created February 18, 2022 19:27
mac os script
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
defaults write NSGlobalDomain AppleLanguages -array "en" "us"
defaults write NSGlobalDomain AppleLocale -string "en_US@currency=USD"
defaults write NSGlobalDomain AppleMeasurementUnits -string "Inches"
defaults write NSGlobalDomain AppleMetricUnits -bool false
# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
// SPDX-License-Identifier: MIT
// contracts/FundingDAO.sol
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract FundingDAO is ReentrancyGuard, AccessControl {
bytes32 public constant MEMBER = keccak256("MEMBER");
bytes32 public constant STAKEHOLDER = keccak256("STAKEHOLDER");

Keybase proof

I hereby claim:

  • I am derekmartinjs on github.
  • I am derekmartin (https://keybase.io/derekmartin) on keybase.
  • I have a public key ASAqyQ9mzE6g2mIyZMcnnhCu5gpXWDwJrixPXdbstf3PIQo

To claim this, I am signing this object:

did:3:kjzl6cwe1jw148zwta9w8m7qm8xe20qhf7wi3z2ts57wh4cj38nkcuiu2nkddcg
@justaguywhocodes
justaguywhocodes / leetcode.json
Created September 26, 2021 04:37
LeetCode questions converted to JSON
This file has been truncated, but you can view the full file.
[{
"id": "1",
"title": "Two Sum",
"question": "Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.\nYou may assume that each input would have exactly one solution, and you may not use the same element twice.\nYou can return the answer in any order.",
"examples": [
"Input: nums = [2,7,11,15], target = 9",
"Output: [0,1]",
"Output: Because nums[0] + nums[1] == 9, we return [0, 1].",
"Input: nums = [3,2,4], target = 6",
"Output: [1,2]",
@justaguywhocodes
justaguywhocodes / leetcode-questions-to-json.mjs
Created September 26, 2021 04:34
Convert LeetCode ePub to JSON format
import cheerio from 'cheerio';
import fs from 'fs';
import { globby } from 'globby';
const main = async() => {
const paths = await globby(['EPUB/*', '!cake']);
let results = [];
paths.forEach((path) => {
const data = fs.readFileSync(path, { encoding: 'utf8', flag: 'r' });