Skip to content

Instantly share code, notes, and snippets.

View zfogg's full-sized avatar
🔐
24BD65F25E5D7311F5FFB2D3EDDAE1DA7360D7F4

Zachary Fogg zfogg

🔐
24BD65F25E5D7311F5FFB2D3EDDAE1DA7360D7F4
View GitHub Profile
// SPDX-License-Identifier: MIT
pragma solidity 0.8.12;
import {IERC20} from "../interfaces/IERC20.sol";
contract BetEscrow {
event BetOffered(uint betId);
enum Status {

Community Game Designer @ Hack Club

Thank you to everyone who applied for this position. In total, 263 people submitted applications, writing more than 100,000 words in total. To every applicant: thank you. As of 2021-01-27, this posting is now closed.

At Hack Club (https://hackclub.com), a 501(c)(3) nonprofit, we're building a giant video game, but instead of being made out of bits and code, it's made out of teenagers. And instead of pushing players to get a high score, Hack Club helps teenagers learn to code, build the most meaningful friendships of their lives, and develop strong identities to become the future leaders our world needs.

Alongside the soccer players, theater kids, and band geeks, we aspire to create and foster a new type of high schooler: the teenage hacker. Our goal: to become as ubiquitous, as universal, and as culturally foundational for young people today as the Girl and Boy Scouts were 70 years ago.

Title: Community Game Designer

@ignacioribes
ignacioribes / GasPricesWidget.js
Last active May 19, 2022 08:24
A scriptable Gas Price Widget
const ethGasStationApiUrl = `https://ethgasstation.info/api/ethgasAPI.json`;
const req = new Request(ethGasStationApiUrl);
const res = await req.loadJSON();
if (config.runsInWidget) {
const widget = new ListWidget();
const title = widget.addText("Gas Prices");
title.textColor = Color.white();
title.textOpacity = 0.8;
@50percentgrey
50percentgrey / apple.sh
Created January 29, 2020 19:11
Delete-Clean Unnecessary files / Apple / Xcode
#!/bin/bash
# Delete Archived Applications
rm -r ~/Library/Developer/Xcode/Archives/*/
# Delete Devired Data
rm -r ~/Library/Developer/Xcode/DerivedData/*/
# Delete Apple cached files
rm -r ~/Library/Developer/CoreSimulator/Caches/dyld/*/*/
@romkatv
romkatv / Pure style for Powerlevel10k.md
Last active July 21, 2024 08:34
Pure style for Powerlevel10k

Powerlevel10k can generate the same prompt as Pure.

pure

Installation

git clone https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc
@pedrouid
pedrouid / walletconnect-instant.md
Last active June 26, 2024 13:04
WalletConnect Instant ⚡

WalletConnect Instant ⚡

What's an Instant Request?

WalletConnect Instant feature introduces the ability to make an ephemeral session that bypasses the process of session approval by the wallet, displaying to the user a call request to be signed from the Dapp right after scanning the QR Code. This is useful for one-time use-cases like payments, topping-up or withdrawals. This is still highly experimental and hasn't been published to the official library. A PoC to aggregate feedback on this feature!

Source code available at WalletConnect/walletconnect-monorepo on walletconnect-instant branch.

Install

@pamolloy
pamolloy / README.md
Last active January 23, 2024 07:28
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
@Jachimo
Jachimo / README.md
Created June 2, 2018 02:29
Using ZeroTier to route between two UniFi USG LANs

Routing between two UniFi USG based LANs with ZeroTier

Intro

This is a quick explanation of how to configure both ZeroTier and two Ubiquiti UniFi USGs to allow routing between two IPv4 networks. Both networks are in private (RFC1918) address space and each one has its own DHCP service. There is no need for NAT between them, only IP routing.

The two networks are 192.168.1.0/24 (call this the "left" network) and 192.168.10.0/24 (the "right" network) but they can be anything. Also, you can have multiple CIDR blocks on one side or the other of the ZeroTier route; if you do, you just have to create more routing table entries.

@mbinna
mbinna / effective_modern_cmake.md
Last active July 20, 2024 22:17
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@Piasy
Piasy / install_ffmpeg.sh
Last active April 14, 2024 05:40
brew install ffmpeg with all options
brew options ffmpeg
brew install ffmpeg \
--with-chromaprint \
--with-fdk-aac \
--with-fontconfig \
--with-freetype \
--with-frei0r \
--with-game-music-emu \
--with-libass \