Skip to content

Instantly share code, notes, and snippets.

View zfogg's full-sized avatar
🔐
24BD65F25E5D7311F5FFB2D3EDDAE1DA7360D7F4

Zachary Fogg zfogg

🔐
24BD65F25E5D7311F5FFB2D3EDDAE1DA7360D7F4
View GitHub Profile
@zfogg
zfogg / ellydeez-remote-ring.FINAL.ino
Created January 4, 2023 20:45
Ellydeez - Remote Control LED Ring FINAL
#include <Adafruit_NeoPixel.h>
#include <IRremote.hpp>
#include <FastLED.h>
#define LED_PIN 7
#define IRRECV_PIN 8
#define FPS_MILLIS 17
#define NUM_LEDS 12
unsigned int brightness = 32;
@zfogg
zfogg / ellydeez-ir.ino
Created January 4, 2023 20:05
Ellydeez - Infrared Receiver logging
#include <IRremote.hpp>
#define IRRECV_PIN 8
void setup() {
// Open a serial connection for printing logs.
Serial.begin(9600);
// Turn on the infrared receiver.
// SPDX-License-Identifier: MIT
pragma solidity 0.8.12;
import {IERC20} from "../interfaces/IERC20.sol";
contract BetEscrow {
event BetOffered(uint betId);
enum Status {
@zfogg
zfogg / 0.README.follow-github-org-members.md
Last active October 11, 2021 14:45
Follow everyone in a GitHub Organization

GitHub Org - Follow Members

How to use it

Manually

  1. Navigate to a GitHub organization's member page.
  2. Open your browser devtools and go to the JavaScript console tab.
  3. Copy 1.follow-github-org-members.js to your clipboard.
  4. Paste the script into the JavaScript console and run it, once per page of organization members.
@zfogg
zfogg / 3box
Created February 28, 2021 07:41
3box verification
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreibdbideyyqal6jg6othyvzpa2at5x35ejudk2pr3uabugp3fvjczm ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@zfogg
zfogg / _etc_X11_xorg.conf
Created October 18, 2020 10:13
Reverse Prime Xorg config
Section "ServerLayout"
Identifier "layout"
Screen 0 "intel"
Inactive "nvidia"
Option "AllowNVIDIAGPUScreens"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
@zfogg
zfogg / tcp_checker.sh
Created October 16, 2020 20:10
network testing on any UNIX system without calling any binaries
#!/usr/bin/env sh
address=${1:-localhost}
port=${2:-53}
proto=${3:-tcp}
(echo > "/dev/$proto/$address/$port") >/dev/null 2>&1 \
&& echo "✅ $address:$port is ONline ✅" \
|| echo "⛔ $address:$port is OFFline ⛔"
@zfogg
zfogg / apple.sh
Created July 30, 2020 12:29 — forked from 50percentgrey/apple.sh
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/*/*/
@zfogg
zfogg / flux-async-actions.md
Last active August 21, 2018 15:32
Flux - brainstorming patterns for async actions

Flux - all about async actions

So, let's say you have a basic Flux action that fetches remote data asynchronously, and then dispatches that data to its store. The dispatch is called after the async fetch completes, using a promise or callback. Nothing out of the ordinary here! Just your standard async control flow patterns.

Next, let's say we take this action, tie it to a button's onClick, and then we click it. If the async call takes a bit of time to complete (as they tend to do), that click would feel like it either didn't go through or threw an error, because any components listening to the store would do absolutely nothing until the callback completes or the promise resolves (which is when the dispatch will occur).

UI interactions should always give feedback immediately.

If they don't, interactions feel unresponsive, and the app will feel 'broken' in many situations. It will be frustrating to use at the very least!


@zfogg
zfogg / blockstack-verification.txt
Created April 9, 2018 11:07
Blockstack verification
Verifying my Blockstack ID is secured with the address 12Y9URumipMVGdnwTf6G2pVC2ZAaXRtcsH https://explorer.blockstack.org/address/12Y9URumipMVGdnwTf6G2pVC2ZAaXRtcsH