I hereby claim:
- I am tabuchid on github.
- I am tabuchid (https://keybase.io/tabuchid) on keybase.
- I have a public key ASCa_0zZTqq4Di0zzTuhhlZgRExIIUsqHKLbZq9YRFPn-go
To claim this, I am signing this object:
generated Jan 17, 2023 23:11:59 | |
system MacOS 13.1 Darwin 22.2.0 x86_64 | |
emacs 28.2 ~/.emacs.d/ | |
doom 3.0.0-pre PROFILE=_@0 grafted, HEAD -> master, origin/master, | |
origin/HEAD e966249 2023-01-01 21:55:13 -0500 ~/.doom.d/ | |
shell /usr/local/bin/zsh | |
features ACL GIF GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 | |
MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF | |
TOOLKIT_SCROLL_BARS XIM XWIDGETS ZLIB | |
traits batch server-running envvar-file custom-file |
I hereby claim:
To claim this, I am signing this object:
#System Design Cheatsheet
Picking the right architecture = Picking the right battles + Managing trade-offs
##Basic Steps
/// Observes a run loop to detect any stalling or blocking that occurs. | |
/// | |
/// This class is thread-safe. | |
@interface GHRunLoopWatchdog : NSObject | |
/// Initializes the receiver to watch the specified run loop, using a default | |
/// stalling threshold. | |
- (id)initWithRunLoop:(CFRunLoopRef)runLoop; | |
/// Initializes the receiver to detect when the specified run loop blocks for |
##Some apps to install before moving forward:
// Asynchronously loads UIImages from the given URLs, but throttles the loading | |
// to keep memory and CPU usage sane. | |
- (RACSignal *)loadImagesAtURLs:(NSArray *)imageURLs { | |
// Map each URL to a signal of work. The result is a signal of work signals. | |
return [[imageURLs.rac_signal | |
map:^(NSURL *imageURL) { | |
return [[[[NSURLConnection | |
// Load the URL asynchronously. | |
rac_sendAsynchronousRequest:[NSURLRequest requestWithURL:imageURL]] | |
reduceEach:^(NSURLResponse *response, NSData *data) { |
# Our .tmux.conf file | |
# Setting the prefix from C-b to C-a | |
# START:prefix | |
set -g prefix C-a | |
# END:prefix | |
# Free the original Ctrl-b prefix keybinding | |
# START:unbind | |
unbind C-b | |
# END:unbind |
function gitclean { | |
current_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') | |
if [ "$current_branch" != "master" ]; then | |
echo "WARNING: You are on branch $current_branch, NOT master." | |
fi | |
echo "Fetching merged branches..." | |
git remote prune origin | |
remote_branches=$(git branch -r --merged | grep -v '/master$' | grep -v "/$current_branch$") | |
local_branches=$(git branch --merged | grep -v 'master$' | grep -v "$current_branch$") | |
if [ -z "$remote_branches" ] && [ -z "$local_branches" ]; then |
function gitclean(){ | |
git remote prune origin | |
git branch -a --merged | grep -v master | sed -e 's/.*\//:/g' | xargs git push origin | |
} |
#include <NewSoftSerial.h> | |
#include <Thermal.h> | |
int printer_RX_Pin = 2; | |
int printer_TX_Pin = 3; | |
Thermal printer(printer_RX_Pin, printer_TX_Pin); | |
void setup() { | |
Serial.begin(9600); // Initialize serial port |