- Install iTerm2 from https://www.iterm2.com/
- Install oh-my-zsh from https://ohmyz.sh/ or https://github.com/robbyrussell/oh-my-zsh
- Set iTerm2 theme tab theme to Dark -
Preferences | Appearance | Tabs | Theme > Dark - Install Fira Code fonts from https://github.com/tonsky/FiraCode (Clone and navigate to
dstr > ttf, install all font files by double clicking) - Install Powerline fonts from https://github.com/powerline/fonts
- Set fonts for iTerm2 -
Preferences | Profiles | Text- Change
Fontto14pt Fira code regularand CheckUse Ligaturescheckbox - Change
Non ASCII Fontto14pt Fira monoand CheckUse Ligaturescheckbox
- Change
- Install iTerm2 snazzy theme from https://github.com/sindresorhus/iterm2-snazzy
- Navigate to
Preferences | Profiles | Color Presets > Snazzy
- Navigate to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You are ChatGPT, a large language model based on the GPT-5 model and trained by OpenAI. | |
| Knowledge cutoff: 2024-06 | |
| Current date: 2025-08-08 | |
| Image input capabilities: Enabled | |
| Personality: v2 | |
| Do not reproduce song lyrics or any other copyrighted material, even if asked. | |
| You're an insightful, encouraging assistant who combines meticulous clarity with genuine enthusiasm and gentle humor. | |
| Supportive thoroughness: Patiently explain complex topics clearly and comprehensively. | |
| Lighthearted interactions: Maintain friendly tone with subtle humor and warmth. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Cloudflare as Dynamic DNS | |
| # From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/ | |
| # Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/ | |
| # Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/ | |
| # Update these with real values | |
| auth_email="[email protected]" | |
| auth_key="global_api_key_goes_here" | |
| zone_name="example.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This is a test where I was trying to isolate how much we lost to `reflect` | |
| // with channel operations in a tight loop. | |
| // | |
| // PREAMBLE | |
| // We do a lot of processing of stream data where ordering with respect to a | |
| // shard indicator like user ID matters. We've done this a few times where we | |
| // implement fanout based on hashing into an slice/array of channels, and it's | |
| // lightning fast but it ends up leaving a lot of boilerplate in your code. | |
| // | |
| // So I started writing a library that would do the non-critical boilerplate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This will open up a prompt for text to send to a console session on digital ocean | |
| // Useful for long passwords | |
| (function () { | |
| window.sendString = function (str) { | |
| f(str.split("")); | |
| function f(t) { | |
| var character = t.shift(); | |
| var i=[]; | |
| var code = character.charCodeAt(); | |
| var needs_shift = character.match(/[A-Z!@#$%^&*()_+{}:\"<>?~|]/); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // #Warning! You Should Use this Code Carefully, and As Your Own Risk. | |
| package main | |
| import ( | |
| "fmt" | |
| "net/url" | |
| "strings" | |
| ) | |
| /* | |
| After hours searching, I can't find any method can get the result exact as the JS encodeURIComponent function. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // My version of pimpl ([email protected]) | |
| // See http://en.cppreference.com/w/cpp/language/pimpl | |
| #include <iostream> | |
| // interface (widget.h) | |
| class widget { | |
| struct impl; | |
| public: | |
| static widget* create(int); // replacement of new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd ~/ | |
| mkdir .localhost-ssl | |
| sudo openssl genrsa -out ~/.localhost-ssl/localhost.key 2048 | |
| sudo openssl req -new -x509 -key ~/.localhost-ssl/localhost.key -out ~/.localhost-ssl/localhost.crt -days 3650 -subj /CN=localhost | |
| sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/.localhost-ssl/localhost.crt | |
| npm install -g http-server | |
| echo " | |
| function https-server() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1. open DownloadMaster in chrome | |
| // 2. use the code in chrome console | |
| urls = ["", ""] //urls array | |
| addDownload = function(url) { | |
| showPanel(); | |
| document.getElementById("HTTP_usb_dm_url").value = url; | |
| dm_add_status(); | |
| } |
NewerOlder