Unix Tools

πŸ€— User Management

# Change username
usermod -l new old

πŸ“ File Management

tar -xzvf (uncompress gz)
tar -xjvf (uncompress bz2)

tar -czvf router.apkovl.tar.gz router/ (compress to gz)

When filesystem is mounted under SMB, even root will have trouble settings correct permissions through the sudo command. You can get around this problem by specifying --no-same-owner

tar xzvf stuff.tar.gz --no-same-owner -C /media/dest

πŸ’Ύ Disk Management

df -h # human readable disk usage
fdisk
parted

πŸ’» Hardware Management

lsmod # list loaded kernel modules

# blacklisting kernel modules
vim /etc/modprobe.d/blacklist.conf

# see installed firmware
cd /lib/firmware/*

🌐 LAN Management

# All saved / bootable interfaces
cat /etc/network/interfaces

# Example

auto lo iface lo inet loopback

iface eth0 inet manual

auto-hotplug wlan0 iface wlan0 inet dhcp wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

# All current available interfaces
ls /sys/class/net

# Probe master mode for interface
iwconfig wlan1 mode master

TIL wtf a subnet mask actually is

Only change within the range of numbers not AND'ed by that value

ip = 192.168.5.255/24 #CIDR Notation

base = 192.168.5.255

subnet-mask = 255.255.255.000

     11000000.10101000.00000111.01111111
 AND 11111111.11111111.11111111.00000000
     β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
     1100000.00001010.00000111.00000000
Configuring A DHCP Service
sudo apt install isc-dhcp-server
# or
sudo apk add dhcp-server-vanilla dhcp-openrc 

https://wiki.alpinelinux.org/wiki/Small_Office_Services#Install_and_Configure_DHCP_and_DNS_services

https://wiki.debian.org/NetworkConfiguration#Manual_config

🌎 WAN Management

SSH Reverse Tunneling
ssh –f –N –T –R 2222:localhost:22 [email protected]
  • -f: tells the SSH to background itself after it authenticates, saving you time by not having to run something on the remote server for the tunnel to remain alive.
  • -N: if all you need is to create a tunnel without running any remote commands then include this option to save resources.
  • -T: useful to disable pseudo-tty allocation, which is fitting if you are not trying to create an interactive shell.
    autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3"
  • autossh for auto reconnect on intervals ο»Ώ
    autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" –f –N –T –R 2222:localhost:22 [email protected]

πŸ”‘ Auth / Logging

last
> user      pts/4        108.210.178.151  Sun Jan 26 04:05   still 
> logged in
...

vim /var/log/auth.log
> Jan 24 03:07:47 hostname sshd[14435]: Invalid user admin from 141.98.81.37 port 42579
...

cat /etc/passwd # for user lists and shell defaults

🌱 Init Systems

Open RC

Commands

rc-update add <service> <runlevel>
rc-update del <service> <runlevel>
rc-service <service> <start stop restart>
rc-status
rc <runlevel> 

Script Example

  • init scripts in /etc/init.d
  • update-rc.d does not work fine if there is no specific comment block in the start script that looks like this:
  • On Raspbian Buster (v10) #! /bin/sh must appear right before the BEGIN INIT INFO block.
    #!/sbin/openrc-run
    

BEGIN INIT INFO

Provides: reverse-ssh

Required-Start:

Required-Stop:

Default-Start: 2 3 4 5

Default-Stop: 0 1 6

Short-Description: Start reverse ssh at boot time

Description: Start reverse ssh at boot time.

END INIT INFO

. /etc/init.d/functions.sh

depend(){ need sshd }

start() { echo "Opening reverse shell." /usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -f -N -R 8000:localhost:22 vpn@192.168.0.0 }


### Systemd

#### Commands

sudo service start</p> <pre><code> #### Script example</code></pre> <p>#!/bin/sh ο»Ώ #ssh -R 8000:localhost:22 <a href="mailto:vpn@167.172.148.6">vpn@167.172.148.6</a> ο»Ώ</p> <h3 id="begin-init-info-1">BEGIN INIT INFO</h3> <h1 id="provides-new-reverse-ssh">Provides: new-reverse-ssh</h1> <h1 id="required-start-1">Required-Start:</h1> <h1 id="required-stop-1">Required-Stop:</h1> <h1 id="default-start-2-3-4-5-1">Default-Start: 2 3 4 5</h1> <h1 id="default-stop-0-1-6-1">Default-Stop: 0 1 6</h1> <h1 id="short-description-start-reverse-ssh-at-boot-time-1">Short-Description: Start reverse ssh at boot time</h1> <h1 id="description-start-reverse-ssh-at-boot-time-1">Description: Start reverse ssh at boot time.</h1> <h3 id="end-init-info-1">END INIT INFO</h3> <p>ο»Ώ start() { echo "Opening reverse shell." /usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -f -N -R 8000:localhost:22 <a href="mailto:vpn@167.172.148.6">vpn@167.172.148.6</a> } ο»Ώ case "$1" in start) start;; *) echo "Usage: ${0:-} {start|stop|status|restart|reload|force-reload}" >&2 exit 1;; esac ο»Ώ</p> <p>```</p> <h5 id="references">References</h5> <ul> <li><a href="https://www.linux.com/tutorials/managing-linux-daemons-init-scripts/">https://www.linux.com/tutorials/managing-linux-daemons-init-scripts/</a></li> <li><a href="https://www.everythingcli.org/ssh-tunnelling-for-fun-and-profit-autossh/">https://www.everythingcli.org/ssh-tunnelling-for-fun-and-profit-autossh/</a></li> <li><a href="https://askubuntu.com/questions/936728/how-to-keep-ssh-connection-alive">https://askubuntu.com/questions/936728/how-to-keep-ssh-connection-alive</a></li> <li><a href="https://unix.stackexchange.com/questions/102918/service-to-start-on-boot-doesnt-work-with-update-rc-d-command">https://unix.stackexchange.com/questions/102918/service-to-start-on-boot-doesnt-work-with-update-rc-d-command</a></li> </ul> </div></section></main></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"things":[{"layout":"blog","name":"alpine","notes":"# Alpine Linux\n\nIf 'the event' or societal collapse happens anytime soon, it will be more important to save stored energy as much as possible. Using Alpine imo is eco friendly, cute, and generally really efficient compared to other popular distros.\n\n### Alpine RPi Router\n\n#### 1) Format with fdisk\n```\nfdisk /dev/sdb\no # set to dos partition table\nn # new partition\nenter #default for first seg\nenter #default last seg\nt\nb # hex value for WIN FAT32 \na # bootable\n```\n\n#### 2) Create filesystem\n```\nmkdosfs -F 32 /dev/sdb1\n# or\nmkfs.vfat -F 32 /dev/sdb1\n```\n\n#### 3) Boot and run ```setup-alpine```\n```\nWhere do you want to store configs? (lbu cache)\nWhere do you want to cache apks? (apk cache inside lbu cache)\n```\n\n\n#### 4) Setup Interfaces + wpa_supplicant\n```\nsetup-interfaces\n# or\nip link set \u003cwlan0\u003e up\niwlist \u003cwlan0\u003e scanning\nwpa_passphrase \u003cssid\u003e \u003cpassphrase\u003e \u003e\u003e /etc/wpa_supplicant/wpa_supplicant.conf\n````\n\n#### 4.5) Pulling and confirming device firmware\n - ~~look for packages named ο»Ώlinux-firmware-rt*~~\n - ~~issues loading rt2800lib(usb) to kernel~~\n - seems the rtxxxx.bin used for the device is located in the 'linux-firmware-other' package now\n - rt2870.bin works when installed from 'linux-firmware-other' does not when installed directly through linux-firmware-rt* packages\n\n```\nhttps://forums.kali.org/showthread.php?37575-rt2800usb\nhttps://gitlab.alpinelinux.org/alpine/aports/issues/274\nhttps://www.raspberrypi.org/forums/viewtopic.php?t=15465\nhttps://gitlab.alpinelinux.org/alpine/aports/issues/7613\n```\n\n#### 5) Setting Up Access Points\n - Might have to switch to raspbian lite, the AP's wont switch to master mode and I have a feeling it's due to the drivers\n - next steps are to configure hostapd and hope for the best\n```\n\n```\n#### 6) Use ufw for firewall"},{"layout":"blog","name":"armored-core","notes":"# Playing Armored Core\n\n## Armored Core 2\n\nTODO: One day I'll go back and log the parts list up to Chimera\n- [Secret Parts](https://gamefaqs.gamespot.com/ps2/196634-armored-core-2/faqs/9416)\n\n### Builds\n```\n\nRank 22\n\n── AC\n β”œβ”€β”€ head Β· EHD-ONE-NT\n β”œβ”€β”€ core Β· ZCX-F/ROOK\n β”œβ”€β”€ arms Β· EAN-1111\n β”œβ”€β”€ legs Β· ZLN-EK1/SRRT\n β”œβ”€β”€ booster Β· ZBT-H4/T\n\n\nRank 30\n\n── AC\n β”œβ”€β”€ head Β· EHD-ONE-NT\n β”œβ”€β”€ core Β· ZCX-F/ROOK\n β”œβ”€β”€ arms Β· EAN-1111\n β”œβ”€β”€ legs Β· ZLN-EK1/SRRT\n\n\nRank 31\n\n── AC\n β”œβ”€β”€ head Β· EHD-ONE-NT\n β”œβ”€β”€ core Β· ZCX-F/ROOK\n β”œβ”€β”€ arms Β· EAN-1111\n β”œβ”€β”€ legs Β· ZLN-EK1/SRRT\n\n```\nOrder Of Purchase (best I can remember)\n\n```\nlegs -\u003e booster -\u003e generator -\u003e unit R -\u003e arms -\u003e head -\u003e radiator -\u003e unit L\n\n--- Honeymoon\n\nlegs\n```\n\n### Arena\n\n - 22. [ Samsara ]\n - Fast and knows how to target you. Need the ZBT-H4/T to out maneuver them.\n - 23. [ Divine Bloom ]\n - used the same weapon, the machine gun. Had to slow down and use cover.\n\n - 29... flamethrower worked until 24\\, close quarters works best.\n\n - 30. [ Chimera ] - where I think the AI starts to get smart\n - Flamethrower + Radar + Murakumo\n\n\n### Memorable Missions (Codename)\n - (Honeymoon)\n - Hadn't bought a radar and really needed one. hard to locate all the skimmer boats \n \n"},{"layout":"blog","name":"cheese","notes":"# Cheese\n\n### Truffle Parrano\n - Firm, nutty Parmesan style cheese with a liberal amount of truffle oil 10/10\n\n### Pecorino Tuscano\n - Need to try again - N/A\n\n### Jarlsberg\n - Mild, buttery, but almost refreshing. Better by the pound 10/10\n\n### Swiss Emmentaler\n - Dry, rubbery, very firm. Has little taste but hints at being sweet and nutty. Good for melting 10/10\n\n### Caveman Blue\n - Blue cheese BUT aged w/ cheese crystals. Eat within 2 days as the freshness falls off fast 10/10\n\n### Truffle Tremor\n - Aged goat cheese blended with truffle oil. Excellent with beef. 10/10\n\n### Murray's Honey Goat Gouda\n - imagine eating a honey cheese cake baked by tiny bees in aprons. Has lite, almost topping like crystaling, and juggles a subtle bite of goat cheese with the creamy sweetness of gouda 10/10\n\n### Reypener Extra-Aged Gouda\n - Slow ripened for 2 years. Rich, dense, with beautiful orange coloring. Has crystals and tones of caramel and coffee. No man is an island, but this cheese stands alone 10/10\n\n### Mimolette\n - Deep orange coloring similar to the edges of unpurified amber. Dense, and much like an aged gouda in consistency. Thick, like biting into a chocolate bar but without melting. A cross between a dessert and a snack for those who like cheese. 10/10\n\n### Kerrygold Dubliner w/ Irish Stout\n - This is actually a dessert. Sharp, crumbly but melts in your mouth. The stout hits seconds after the creaminess of the dubliner. A wild transition of flavor, but can be overwhelming. Akin to a triple chocolate cake. Savor it and eat in small increments 10/10\n\n### Reading\n - Need to try again - N/A"},{"layout":"blog","name":"linux","notes":"# Unix Tools\n\n### πŸ€— User Management\n```\n# Change username\nusermod -l new old\n```\n\n### πŸ“ File Management\n```\ntar -xzvf (uncompress gz)\ntar -xjvf (uncompress bz2)\n\ntar -czvf router.apkovl.tar.gz router/ (compress to gz)\n```\n\nWhen filesystem is mounted under SMB, even root will have trouble settings correct permissions through the sudo command. **You can get around this problem by specifying ```--no-same-owner```**\n\n```\ntar xzvf stuff.tar.gz --no-same-owner -C /media/dest\n```\n### πŸ’Ύ Disk Management\n```\ndf -h # human readable disk usage\nfdisk\nparted\n```\n\n### πŸ’» Hardware Management\n```\nlsmod # list loaded kernel modules\n\n# blacklisting kernel modules\nvim /etc/modprobe.d/blacklist.conf\n\n# see installed firmware\ncd /lib/firmware/*\n```\n\n### 🌐 LAN Management\n```\n# All saved / bootable interfaces\ncat /etc/network/interfaces\n\n# Example\n```\nauto lo\niface lo inet loopback\n\niface eth0 inet manual\n\nauto-hotplug wlan0\n iface wlan0 inet dhcp\n wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf\n```\n# All current available interfaces\nls /sys/class/net\n\n# Probe master mode for interface\niwconfig wlan1 mode master\n```\n\n#### TIL wtf a subnet mask actually is\nOnly change within the range of numbers not AND'ed by that value\n```\nip = 192.168.5.255/24 #CIDR Notation\n\nbase = 192.168.5.255\n\nsubnet-mask = 255.255.255.000\n \n 11000000.10101000.00000111.01111111\n AND 11111111.11111111.11111111.00000000\n β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\n 1100000.00001010.00000111.00000000\n```\n\n##### Configuring A DHCP Service\n```\nsudo apt install isc-dhcp-server\n# or\nsudo apk add dhcp-server-vanilla dhcp-openrc \n```\n- Modify Interfaces\n\n- Modify dhcpd.conf\nhttps://www.cyberciti.biz/faq/debian-ubuntu-linux-setting-wireless-access-point/\n\n[https://wiki.alpinelinux.org/wiki/Small_Office_Services#Install_and_Configure_DHCP_and_DNS_services](https://wiki.alpinelinux.org/wiki/Small_Office_Services#Install_and_Configure_DHCP_and_DNS_services)\n\n[https://wiki.debian.org/NetworkConfiguration#Manual_config](https://wiki.debian.org/NetworkConfiguration#Manual_config)\n\n### 🌎 WAN Management\n##### SSH Reverse Tunneling\n```\nssh –f –N –T –R 2222:localhost:22 username@everythingcli.org\n```\n - -f: tells the SSH to background itself after it authenticates, saving you time by not having to run something on the remote server for the tunnel to remain alive.\n - -N: if all you need is to create a tunnel without running any remote commands then include this option to save resources.\n - -T: useful to disable pseudo-tty allocation, which is fitting if you are not trying to create an interactive shell.\n```\nautossh -M 0 -o \"ServerAliveInterval 30\" -o \"ServerAliveCountMax 3\"\n```\n - autossh for auto reconnect on intervals\nο»Ώ\n```\nautossh -M 0 -o \"ServerAliveInterval 30\" -o \"ServerAliveCountMax 3\" –f –N –T –R 2222:localhost:22 cytopia@everythingcli.org\n```\n\n\n### πŸ”‘ Auth / Logging\n```\nlast\n\u003e user pts/4 108.210.178.151 Sun Jan 26 04:05 still \n\u003e logged in\n...\n\nvim /var/log/auth.log\n\u003e Jan 24 03:07:47 hostname sshd[14435]: Invalid user admin from 141.98.81.37 port 42579\n...\n\ncat /etc/passwd # for user lists and shell defaults\n```\n### 🌱 Init Systems\n\n### Open RC\n - [They are finally writing this πŸ‘ - https://wiki.alpinelinux.org/wiki/Writing_Init_Scripts](https://wiki.alpinelinux.org/wiki/Writing_Init_Scripts)\n - [https://wiki.gentoo.org/wiki/OpenRC](https://wiki.gentoo.org/wiki/OpenRC)\n - [https://wiki.alpinelinux.org/wiki/Alpine_Linux_Init_System](https://wiki.alpinelinux.org/wiki/Alpine_Linux_Init_System)\n\n#### Commands\n```\nrc-update add \u003cservice\u003e \u003crunlevel\u003e\nrc-update del \u003cservice\u003e \u003crunlevel\u003e\nrc-service \u003cservice\u003e \u003cstart stop restart\u003e\nrc-status\nrc \u003crunlevel\u003e \n``` \n\n#### Script Example\n - init scripts in /etc/init.d\n - update-rc.d does not work fine if there is no specific comment block in the start script that looks like this:\n - On Raspbian Buster (v10) #! /bin/sh must appear right before the BEGIN INIT INFO block.\n```\n#!/sbin/openrc-run\n\n### BEGIN INIT INFO\n# Provides: reverse-ssh\n# Required-Start:\n# Required-Stop:\n# Default-Start: 2 3 4 5\n# Default-Stop: 0 1 6\n# Short-Description: Start reverse ssh at boot time\n# Description: Start reverse ssh at boot time.\n### END INIT INFO\n# . /etc/init.d/functions.sh\n\ndepend(){\n need sshd\n}\n\nstart() {\n echo \"Opening reverse shell.\"\n /usr/bin/autossh -M 0 -o \"ServerAliveInterval 30\" -o \"ServerAliveCountMax 3\" -f -N -R 8000:localhost:22 vpn@192.168.0.0\n}\n```\n\n### Systemd\n\n#### Commands\n```\nsudo service \u003ctitle\u003e start\n```\n\n#### Script example\n```\n#!/bin/sh\nο»Ώ\n#ssh -R 8000:localhost:22 vpn@167.172.148.6\nο»Ώ\n### BEGIN INIT INFO\n# Provides: new-reverse-ssh\n# Required-Start: \n# Required-Stop: \n# Default-Start: 2 3 4 5\n# Default-Stop: 0 1 6\n# Short-Description: Start reverse ssh at boot time\n# Description: Start reverse ssh at boot time. \n### END INIT INFO \nο»Ώ\nstart() {\n echo \"Opening reverse shell.\"\n\t/usr/bin/autossh -M 0 -o \"ServerAliveInterval 30\" -o \"ServerAliveCountMax 3\" -f -N -R 8000:localhost:22 vpn@167.172.148.6\n}\nο»Ώ\ncase \"$1\" in\n start)\n\tstart;;\n *)\n echo \"Usage: ${0:-} {start|stop|status|restart|reload|force-reload}\" \u003e\u00262\n exit 1;;\nesac\nο»Ώ\n```\n\n##### References\n - [https://www.linux.com/tutorials/managing-linux-daemons-init-scripts/](https://www.linux.com/tutorials/managing-linux-daemons-init-scripts/)\n - [https://www.everythingcli.org/ssh-tunnelling-for-fun-and-profit-autossh/](https://www.everythingcli.org/ssh-tunnelling-for-fun-and-profit-autossh/)\n - [https://askubuntu.com/questions/936728/how-to-keep-ssh-connection-alive](https://askubuntu.com/questions/936728/how-to-keep-ssh-connection-alive)\n - [https://unix.stackexchange.com/questions/102918/service-to-start-on-boot-doesnt-work-with-update-rc-d-command](https://unix.stackexchange.com/questions/102918/service-to-start-on-boot-doesnt-work-with-update-rc-d-command)"},{"layout":"blog","name":"cross-platform","notes":"# Cross Platform Development\n\n### Haskell\n - Inspired by [Luite Stegemann](http://weblog.luite.com/wordpress/?p=127)\n - [Reflex](https://reflex-frp.org/tutorial) as a framework\n - [Obelisk](https://github.com/obsidiansystems/obelisk/#installing-obelisk) framework and development tool for multi-platform Haskell applications\n - [nix](https://nixos.org/nix/) for package management\n - package for alpine exist"},{"layout":"blog","name":"css","notes":"# Notes on CSS and HTML\n\nI'm really intrigued by how simple but functional css/html can be. If I can find commonly found, reactive features available in pure css/html, I'll place them here. Also a few failed efforts.\n\n## Pure CSS Search\n\n#### 1. ~~Matching on value attribute from ```\u003cinput/\u003e```~~\n\n- attempt to narrow a list of items by autocomplete searching and using attribute selectors (likely input[value~=\"\"]\n- content can move [from CSS to HTML](https://css-tricks.com/css-attr-function-got-nothin-custom-properties) just not from HTML to CSS as [it was removed from the spec](https://www.w3.org/TR/selectors-3/#content-selectors). it's also ironically placed under section 6.6.6. \n- ```value=\"\"```'s are added to inputs within react and other frontend frameworks, so the ability to match on an updated value attribute is lost. I originally thought this was inherent in html input elements\n - Side note, [CSS keyloggers rely on javascript](https://www.bram.us/2018/02/21/css-keylogger-and-why-you-shouldnt-worry-about-it/) and technically do not work in non-javascript environments\n\n- note that ```\u003cdetails\u003e``` toggles an open attribute on the element when clicked. If an html element would allow content to be added on a mouse down, you could set an input tags value without javascript, or just remove all but the selected\n\n#### 2. ~~Using the content of a ```\u003cdiv contenteditable=\"true\" /\u003e```~~\n\n- still not an attribute, content is still not selectable even if [editable](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content)\n- the answer might be found with [other global attributes](https://www.w3schools.com/tags/ref_standardattributes.asp)\n\n\n#### 3. ~~Using ```\u003cdatalist\u003e``` to autocomplete ```\u003coptions/\u003e``` on an ```\u003cinput/\u003e```~~\n\n- the killer here is really the same as above. You can autocomplete and technically sub-string 'search' terms based on the native implementation of an ```\u003cinputs list=\"whatever\"/\u003e```\n- the problem is after you select an option, no attribute is set in the html.\n- further more, you [cannot style](https://stackoverflow.com/questions/7208786/how-to-style-the-option-of-an-html-select-element) or [manipulate options](https://github.com/w3c/csswg-drafts/issues/2013) you've created for the dataset in the actual options list because the functionality is handled natively. I attempted setting ```\u003cdataset style=\"position: absolute;\"/\u003e``` and was hoping the static list (assuming it was the same when auto-completing) would start to disappear\n\n#### 4. ~~Form submit allowing autocompleted value to be submitted as the slug~~\n - we can substring search the ```\u003coptions /\u003e```, but we can't reduce the list of options after search. Fine.\n - can we at least utilize the search result with a form?\n - it's either a query param or a POST that has a body\n\n#### 5. ~~Submit query params and pull them into css~~\n - It's not really possible, but i'd have to **whole css file** [for each matching 'thing'](https://stackoverflow.com/questions/23816060/is-it-possible-to-pass-parameters-to-css-file)\n\n#### 5. (Cheat) Have an expandable, hoverable A-Z list that will collapse the options based on first letter\n - it's not search, but it will serve the same function\n - allow letters active and search in an order\n\n\n### Resources\n - [3D Models in CSS](http://tridiv.com/)\n - [20+ impressive CSS Only projects](https://medium.mybridge.co/26-impressive-web-projects-built-with-css-only-4a4c2f773a21?gi=23aa236eb46b)\n - Very ready to give up, found [someone thinking about search in css back in 2013](https://www.redotheweb.com/2013/05/15/client-side-full-text-search-in-css.html)\n\n### Content Toggles\n\n\u003cdetails\u003e\n \u003csummary\u003eContent toggles\u003c/summary\u003e\u003cp\u003e\n\n```\n\u003cdetails\u003e\n \u003csummary\u003eContent Toggles\u003c/summary\u003e\n \u003cp\u003ethis details tag and some other content\u003c/p\u003e\n\u003c/details\u003e\n```\n\n\u003c/p\u003e\u003c/details\u003e"},{"layout":"blog","name":"dart-flutter","notes":"# Dart + Flutter\n\n### Architecture\n\n#### State\n* [**redux**](https://pub.dev/packages/redux) - just as good in dart\n* [**redux_thunk**](https://pub.dev/packages/redux_thunk) - everything is an action\n* [**redux_persist**](https://pub.dev/packages/redux_persist) - control in memory and cold storage data from store\n\n### Serialization\n* [**dart_json_mapper**](https://pub.dev/packages/dart_json_mapper) - generates toJson/fromJson for models but does so at build time, files generated are not saved to filesystem - supports Uint8List which will be used wherever cached images are supported\n* **json_serializable** does not support Uint8List / byte arrays in models**\n\n### Storage\n* **flutter_secure_storage** - uses respective platform keychains to save store\n* [**sqlcipher**](https://pub.dev/packages/sqflite_sqlcipher) sqlite, but encrypted\n* [**sembast**](https://pub.dev/packages/sembast) - nosql storage for flutter/dart\n* [**hive**](https://pub.dev/packages/hive) - nosql storage, but tightly coupled to encryption and serialization, should attempt to serialize with a separate library and cache with a different library\n * [previous Hive user that converted to sembast](https://old.reddit.com/r/FlutterDev/comments/hwl387/i_abandoned_hive_moved_to_sembast/)\n\n#### Flow\n* Using redux with streams\n\n * Timer+Store vs. Stream\n * The store itself is a stream that can be observed / listened to\n * The only thing different between them is where you want the stream within the store observed from? the view or still within the store\n * Within the store has an extra layer, but has a separation of concerns\n * Example is initializing a chat observer after authentication\n\n * Leaving this in the view is less friction with streams on streams\n * But you sacrifice separation of concerns\n * [StreamController example](https://www.woolha.com/tutorials/flutter-using-streamcontroller-and-streamsubscription)\n * Converted to streams from using the global onChange and it's noticeably faster\n\n#### Patterns\n\n\u003e JS\n\u003e\n\u003e ```js\n\u003e const newUsers = users.filter(user =\u003e user.new);\n\u003e ```\n\u003e\n\u003e Dart\n\u003e\n\u003e ```dart\n\u003e final newUsers = users.where(user =\u003e user.new).toList();\n\u003e ```\n\n#### UI/UX\n\n* Use containers that span the height and width of the screen when creating scroll views\n* [Implicit Animations Tutorial](https://medium.com/flutter/custom-implicit-animations-in-flutter-with-tweenanimationbuilder-c76540b47185)\n\n#### Resources\n* [showing a more global snackbar](https://stackoverflow.com/questions/49578529/flutter-filter-list-as-per-some-condition)\n* https://flutter.dev/docs/cookbook/forms/focus\n* Space invaders in flutter [link](https://www.youtube.com/watch?v=8OSxUlwRDoM)\n\n#### Research\n##### manual serialization\n - incredibly overwhelming for complex models\n - seems to be a better idea for the higher level containers, or Stores \n##### dart_json_mapper for Json\n - [lists need decorator functions](https://github.com/k-paxian/dart-json-mapper/issues/17)\n - for non-store types, is sort of working without the need for toJsons\n##### RawSerialization\n - consider serializing as raw byte stings?\n##### Consistant Flex Structuring\n - Flexible -\u003e Flex -\u003e Container"},{"layout":"blog","name":"diy-laptop","notes":"# Laptop Builds\n\n- [Aluminum Lapdock Build](https://www.youtube.com/watch?v=mciEZKSvva8)\n- [Wood Cut Chassis](https://www.tinkerloon.com/projects/plytop)\n"},{"layout":"blog","name":"free-data","notes":"# Free Data\n\n### Company icon/logo by name\n - https://autocomplete.clearbit.com/v1/companies/suggest?query=\\\u003ccompany-name\\\u003e"},{"layout":"blog","name":"green-bunker","notes":"# Building A Green Off Grid Bunker"},{"layout":"blog","name":"media-server","notes":"# Media Server Stack\n\n### Plex\n\n\u003e stub\n\n### Radarr\n\n\u003e stub\n\n### Sonarr\n\n* https://forums.sonarr.tv/t/raspberry-pi-4-installation-error/23424\n* after installing mono\n* [Adding indexers via Jackett](https://old.reddit.com/r/sonarr/comments/50yg2f/tutorial_how_to_add_the_pirate_bay_as_an_indexer/)\n\n#### Raspberry Pi Install\n\n```\nsudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493\necho β€œdeb http://apt.sonarr.tv/ master main” | sudo tee /etc/apt/sources.list.d/sonarr.list\nsudo apt update\nsudo apt-get -y install nzbdrone\n```\n\n### Bridge - Inlets\n```\n#!/bin/sh\n\n# Generate Token\nexport token=$(head -c 16 /dev/urandom | shasum | cut -d\" \" -f1);\necho $token;\n\n# Plex\ninlets server --port=32400 --token=$token\n\n```\n"},{"layout":"blog","name":"memories","notes":"# Memories\n* Going to sleep at Auntie house, 3-5 years old, on the mattress at the bottom edge of their bed. Uncle setting the sleep timer on the tube TV while M.A.S.H would play as I fell asleeo\n"},{"layout":"blog","name":"convergence","notes":"# Postmarket OS\n\n#### Setup on Nexus 6P\n\n- [Postmarket OS installation guide](https://wiki.postmarketos.org/wiki/Installation_guide)\n\n- [pmbootstrap installation guide](https://wiki.postmarketos.org/wiki/Installing_pmbootstrap)\n\n- [Nexus 6P Device Guide Link](https://wiki.postmarketos.org/wiki/Google_Nexus_6P_(huawei-angler))\n\n- [Angler: Support Wi-Fi and graphics ticket](https://github.com/postmarketOS/pmbootstrap/pull/555)\n\n### Running pmbootstrap init\n - huawei-angler\n### Working Window Managers (02/2020)\n - ~~phosh~~\n - Fails to start, might be an issue with wayland though device guide has wayland support listed\n - ~~hildon~~ \n - showed a orange graphic artifact, duotone colored, screen and crashed when selecting the panel menu button\n - xfce4\n - set scale factor to x2\n - change panel settings to 3/4 max\n - adwaita dark is available in stock\n - set fonts to 14\n### Input methods\n - [Input Methods Guide](https://wiki.postmarketos.org/wiki/Input_methods)\n - matchbox-keyboard (good but doesn't mimic a mobile keyboard)\n - qt5-qtvirtualkeyboard (still haven't setup but it is installed)\n### Kernel Configuration\n - [Troubleshooting Kernel](https://wiki.postmarketos.org/wiki/Troubleshooting:kernel)\n - [Kernel Config Guide](https://wiki.postmarketos.org/wiki/Kernel_configuration)\n - \"If you don't like the terminal user interface, you can also use pmbootstrap kconfig edit -x or pmbootstrap kconfig edit -g. See pmbootstrap kconfig edit -h for details.\""},{"layout":"blog","name":"networking","notes":"# Raspberry Pi Cluster\n\n[Cluster Tutorial](https://www.nighttype.com/projects/raspberry-pi-cluster/#install-dhcp-server-software-for-master-node)\n\nHardware Setup\n- Rpi v1 x1\n- Rpi v3 x2\n\n\n### Master Node Setup\n\n```\nsudo raspi-config\n# change the hostname to indicate master node\nsudo apt update \u0026\u0026 sudo apt upgrade\nsudo apt install vim isc-dhcp-server\n```\n```\ntouch ssh\ntouch wpa_supplicant.conf\n```\n\n```\ncountry=us\nupdate_config=1\nctrl_interface=/var/run/wpa_supplicant\n\nnetwork={\n scan_ssid=1\n ssid=\"MyNetworkSSID\"\n psk=\"Pa55w0rd1234\"\n}\n```\n### Installing DHCP server software for master node\n\n1. Edit dhcpd.conf\n```\n PUT comment tag # in front of option domain-name \"example.org\";\n PUT comment tag # in front of option domain-name-servers ns1.example.org, ns2.example.org;\n REMOVE the comment tag # in the line #authoritative;\n```\n2.\n```\nsubnet 192.168.8.0 netmask 255.255.255.0 {\n range 192.168.8.100 192.168.8.200;\n option broadcast-address 192.168.8.255;\n option routers 192.168.8.1;\n max-lease-time 7200;\n option domain-name \"rpi3\";\n option domain-name-servers 8.8.8.8, 8.8.4.4;\n}\n```\n### Installing packages for clustering\n\n\n### Installing relevant packages for tensor flow\nhttps://magpi.raspberrypi.org/articles/tensorflow-ai-raspberry-pi\nhttps://www.raspberrypi.org/documentation/linux/software/python.md\n\n```\nsudo apt install python3-pip libatlas-base-dev\npip3 install tensorflow\n```\n\n### Model building\nhttps://www.tensorflow.org/tutorials/customization/custom_training_walkthrough\n"},{"layout":"blog","name":"open-drone","notes":"# Open Source Drone\n\n### Body \n\n- [Garud-500](https://www.thingiverse.com/thing:1940102) Β· Well Rounded\n - \"specially developed for enthusiasts who dream to build their very first custom drone using 3D Printing.\"\n - Good first custom drone, few pieces\n- [Foldable Remix v2](https://www.thingiverse.com/thing:1940102) Β· Compact / Customizable \n - DJI Mavrik clone, attachable extensions\n - Much more portable, more points of failure\n - [Instructable w/ v3](https://www.instructables.com/id/Printable-Foldable-Quadcopter-DJI-Mavic-Clone-Fram/)\n- [Hovership 3D Fly](https://www.thingiverse.com/thing:1098831) Β· Micro\n - Micro drone\n - good 1st/2nd build\n- [HF210](https://www.thingiverse.com/thing:2443581) Β· Speed FPV\n - Racing Drone"},{"layout":"blog","name":"open-hardware","notes":"## Open Hardware\n\n### \\- Custom Laptop\n\n* Print your own [pi-top \\[3]](https://www.adafruit.com/product/3762?gclid=EAIaIQobChMI6qyR87ms5gIVkpOzCh3JXgeMEAYYASABEgKdhvD_BwE)\n\n### \\- Lapdock + Portable SoC Board\n\n* Mirobook\n* [Nexdock 2](\u003c\u003e) \n* ROC-RK3328-CC (Renegade)\n\n * 4gb DDR4\n * 4 ARM Cortex-A53 @ 1.4GHz\n * [ARM Mali-450 MP4](https://www.notebookcheck.net/ARM-Mali-450-MP4.116281.0.html)\n\n### \\- Environment Monitor\n* https://www.youtube.com/watch?v=oqV2xU1fee8\n* "},{"layout":"blog","name":"router","notes":"## Open Router\n\n### OpenWrt Rpi\n\n- Raspbery Pi v3\n- [2x Panda Wireless PAU09 N600 Dual Band Wireless N USB AP](https://www.amazon.com/Panda-Wireless-PAU09-Adapter-Antennas/dp/B01LY35HGO/)\n- [NETGEAR 4G LTE Broadband Modem](https://www.amazon.com/NETGEAR-LTE-Modem-Broadband-Connection/dp/B01N5ASNTE)\n\nI've used this setup for a little over 4 years now. The setup includes a Netgear LTE Modem bridged to the Raspberry Pi over ethernet. Several access points are attached via usb. When used with a T-Mobile data plan, I could get around 10-20mb down and 30mb up. \n\nOver the course of 4 years, OpenWrt on Rpi was fairly stable for basic configurations. The moment I started doing anything more complicated it would crash, most of the time ending up in a kernel panic / boot loop. \n\nSeveral things would kick this off: a tethered android device on one of the few usb ports left or dropping the ESSID of one of the access points. One time it was as small as changing one the AP LEDs config. That one hurt the most. It wouldn't be just making changes in general either, as I changed the SSIDs and passwords frequently. It usually involved changing the way the hardware would interact. After 4 years, I'm tired of having to wipe clean and start again because it was less trouble than figuring out how to change it on the disk while off.\n\nI built up quite a bit of resources I would like to offload just in case:\nο»Ώ\n```\nopkg update\n\n# install realtek drivers and allow usb forwarding\nopkg update\nopkg install kmod-rt2800-lib kmod-rt2800-usb kmod-rt2x00-lib kmod-rt2x00-usb\nopkg install kmod-usb-net-rtl8152\n\n# install usb tethering drivers\nopkg install kmod-usb-net kmod-usb-net-rndis kmod-usb-net-cdc-ether\n\n# install openvpn\nopkg install openvpn-openssl luci-app-openvpn openssl-util\n\n# install\nreboot\n```\n\n#### [Changing the TTL to spoof cell traffic](https://www.linuxtopia.org/Linux_Firewall_iptables/x4799.html) \n#### [More TTL examples in DD-WRT docs](https://wiki.dd-wrt.com/wiki/index.php/Iptables#Modifying_the_TTL)\n#### [Installing necessary RT drivers on openwrt](https://forum.openwrt.org/t/how-install-rtl8812au-driver-on-raspberry-pi-3-with-lede/4093/3)\n#### [Installing Other RT drivers](https://forum.openwrt.org/t/raspberry-3-lan-wan-help-needed/1377/7)\n\nI have an instruction set I'll list out here with time. \n\nAll in all, the ease of use LuCI interface + hardware resource efficiency was really nice to have. When myself or others wanted to make quick changes, it was easy. Unfortunately, the inability to modify anything without the fear of kernel panics and boot loops made it moot.\n\n### Alpine Rpi (armhf)\n\nI set up an array of RPi rsync servers before all running alpine. It worked very well. I'm hoping they'll be just as friendly as a router.\n- https://wiki.alpinelinux.org/wiki/Raspberry_Pi\n "},{"layout":"blog","name":"printing","notes":"## Notes on 3D printing\n\u003cbr\u003e\n\n#### Getting Started Printing - CR-20 Pro\n\u003cbr\u003e\n\n##### Pain Points\n - Clamp to feed filament was not secured down enough, ended up needing extra tightening on both ends\n - The Z-Offset needs to be touching the board at 0.02. This caused a bit of confusion as tutorials made it sound as though space was needed between a 0.02mm piece of paper and the extruder\n - Filament was tangled while I was attempting to feed it without first having tightened the feed clamp\n\n##### After Thoughts\n - [Bed Leveling Calibation](https://i.imgur.com/tbvOlB9.jpg)\n - Use Cura for next print instead of animal model from SDCard\n - Use benchy for confirming the printer can handle whatever and is calibrated\n\n#### Potential DIY Printer Stack\n\n* Boards\n * Mega Arduino w/ RAMPS\n * RAMBo mini (RepRap Arduino-compatible Mother Board)\n * [EINSY RAMBo](https://www.printedsolid.com/products/einsy-rambo-1-1)\n* [Firmware](https://reprap.org/wiki/List_of_Firmware)\n * Marlin\n * RAMPS (?)\n\nRAMBo boards are based on Arduino, most probably are.\n\n\n### Print List\n - [benchy](https://www.thingiverse.com/thing:763622)\n - [cats]()\n - [halloween bulba]()\n - [polygonal starters]()\n - [baby yoda]()\n - [nanoleaf replicas](https://www.thingiverse.com/thing:3230905) [(or one without arduino?)](https://www.thingiverse.com/thing:3354082)"},{"layout":"blog","name":"psychology","notes":"# Psychology\n\n## [Laziness / Procrastination](#laziness)\n\n#### [(Article) Laziness does not exist](https://humanparts.medium.com/laziness-does-not-exist-3af27e312d01)\n\n\u003e When you’re seeking to predict or explain a person’s actions, looking at the social norms, and the person’s context, is usually a pretty safe bet. Situational constraints typically predict behavior far better than personality, intelligence, or other individual-level traits.\n\nShe states its better to response to a persons ineffective behavior with curiosity rather than judgement. Author learned this as a result of talking with Kimberly Longhofer, a writer on accommodation for homelessness.\n\nSummary of example is that one who is homeless may buy alcohol because the nights are cold, the world is unfriendly to them and they are uncomfortable in that cold. Alcohol is one of the most accessible tools available compared to help from others around them and a warm bed.\n\n\u003e In that chronically uncomfortable, over-stimulating context, needing a drink or some cigarettes makes fucking sense.\n\u003e\n\u003e If a person’s behavior doesn’t make sense to you, it is because you are missing a part of their context. It’s that simple.\n\nProcrastination is much the same problem and has a handful of origins:\n\n1. Anxiety about their attempts not being \"good enough\"\n2. Confusion about what the next steps are\n3. The task is meaningful and cares about doing it well\n\nSeveral of those apply to my current progress on Tethor and I often don't work on it if I'm not feeling well slept and ready. If goals, and the process to obtain those goals are established, it's much easier to work towards them. The author uses her dissertation as an example where she had her process and time allotted was not **unknown**.\n\nIt reminds me a lot of the unknowns in *product development*\n\nWhen developers burn out it's often due to unknowns or lack of passion of the product. Not knowing the direction of where the product is headed or its purpose does not inspire confidence to work toward the goal.\n\n\u003e If a person can’t get out of bed, something is making them exhausted. If a student isn’t writing papers, there’s some aspect of the assignment that they can’t do without help. If an employee misses deadlines constantly, something is making organization and deadline-meeting difficult. Even if a person is actively choosing to self-sabotage, there’s a reason for it β€” some fear they’re working through, some need not being met, a lack of self-esteem being expressed.\n\n## [Friendships](#friendships)\n\n#### [(Article) Why We're Better Off With Fewer Friends](https://getpocket.com/explore/item/why-we-re-better-off-with-fewer-friends?utm_source=pocket-newtab)\n\n[Dunbar's Number](https://en.wikipedia.org/wiki/Dunbar's_number)\n\n150 was the main focus, as it's the average cognitive limit of friendships with whom one can maintain stable social relationships. However, the 5,15, and 50 groups are mentioned and have various implications. Nearly all the well-being benefits from friendships are derived from the top 15.\n\nLevels of closeness out of max 150:\\\n5 -\u003e 15 -\u003e 50 -\u003e 150~\n\n\u003e Quality time spent with your 15 closest friends and family will have a direct impact on your happiness, health and longevity (and theirs too)"},{"layout":"blog","name":"punk","notes":"### The Sound (Jeopardy)\n\n* joy divison / the frights / kings of leon / the doors (that organ)\n* favorites\n * the heartland\n * jeopardy\n*"},{"layout":"blog","name":"react-native","notes":"# Notes on React Native\n\n## Architecture Overview\n\nThe greatest injustice I've seen in software development is the unnecessary complexity around project structure. Organizing your files by domain (or feature), instead of by function, allows your code to mirror the UI/UX and act as a virtual map of features\n\n```\n── app (or src)\n β”œβ”€β”€ assets\n β”œβ”€β”€ global\n β”œβ”€β”€ libs\n β”œβ”€β”€ store\n β”œβ”€β”€ views\n └── index.js\n```\n\nFor example, it's your first day at a new startup. Imagine you knew next to nothing about the project you're working on other than that you have users and they manage cooking recipes in the project. A manager asks you to \"change the profile section to look like facebook\". Which file structure would help you get started the fastest? \n\n### By Domain\n\n```\n── app (or src)\n β”œβ”€β”€ assets\n β”œβ”€β”€ global\n β”œβ”€β”€ libs\n β”œβ”€β”€ store\n β”‚ β”œβ”€β”€ auth \n β”‚ β”œβ”€β”€ recipes \n β”‚ β”œβ”€β”€ settings \n β”‚ └── user \n β”‚ β”œβ”€β”€ actions.js \n β”‚ β”œβ”€β”€ reducer.js \n β”‚ └── state.js \n β”œβ”€β”€ views\n β”‚ β”œβ”€β”€ recipes \n β”‚ └── user \n β”‚ β”œβ”€β”€ profile\n β”‚ β”‚ └── index.js (*)\n β”‚ └── index.js \n └── index.js\n``` \n\n### By Function (Type)\n```\n── app (or src)\n β”œβ”€β”€ assets\n β”œβ”€β”€ styles\n β”œβ”€β”€ utils\n β”œβ”€β”€ components\n β”‚ └── user \n β”‚ β”œβ”€β”€ UserComponent.js\n β”‚ └── profile\n β”‚ └── UserProfileComponent.js\n β”œβ”€β”€ pages\n β”‚ └── user\n β”‚ └── profile\n β”‚ └── ProfilePage.js\n β”œβ”€β”€ routes\n β”‚ └── user\n β”‚ └── profile\n β”‚ └── UserRoute.js\n β”œβ”€β”€ redux\n β”œβ”€β”€ index.android.js\n β”œβ”€β”€ index.ios.js \n ...\n``` \n\nWhile preference is subjective, I've onboarded new team members on projects with both, but I've had them deploying faster when structuring 'by domain'.\n\nOffloading the cognitive map of the project to the file structure prevents developers from relying solely on UML or diagrams that structure the flow of the project. The file structure acts as a map to the UI and even the domain logic contained within. You may have observed that the ```by domain``` example seemingly has a top layer of ```by function``` structure. Viewing the project with higher architectural scope allows you to view the 'store' and 'views' as feature sets. Many projects do not have explicit UI/UX (CLI tools or API's) or use a 'store' for handling immutable state (potentially API's). Instead, they may be labeled as 'output' but still contain a 'store' to manage state.\n\n---\n\n## UI Libraries\n\n### [react-native-paper](https://callstack.github.io/react-native-paper/getting-started.html) \n - Minimally styled components\n - Easy to override styling\n\n\n### [native-base]() (not recommended)\n - Heavily opinionated styling\n - Absolute positioning on elements makes it hard to layout\n - Overriding styling is sometimes not possible\n - Bloated theming \n\n---\n\n## Domain Logic\n\n### Helpful Commands\n```bash\n# android\nemulator -list-avds\nemulator -avd \u003cid\u003e\n\n# ios\nxcrun simctl delete unavailable\nxcrun simctl list devices\nxcrun simctl boot \u003cid\u003e\n\n## record\nxcrun simctl io booted recordVideo \u003cfilename\u003e.\u003cextension\u003e\n```\n\n---\n\n### Other\n - [dealing with fonts](https://github.com/react-native-training/react-native-fonts)\n - [using proportions and ratios](https://facebook.github.io/react-native/docs/pixelratio.html) instead of static px values\n\n### Tips\n\u003cdetails\u003e\u003csummary\u003eAbsolute Import Paths\u003c/summary\u003e\u003cp\u003e\n\n```\nmodule.exports = {\n presets: ['module:metro-react-native-babel-preset', 'module:react-native-dotenv'],\n plugins: [\n ['module-resolver', {\n alias: {\n app: './app',\n }\n }]\n ]\n};\n```\n\u003c/p\u003e\u003c/details\u003e\n\n### Tricks\n\u003cdetails\u003e\u003csummary\u003eCustom iOS Back\u003c/summary\u003e\u003cp\u003e\n\n```jsx\n \u003cTouchableOpacity\n onPress={navigation.getParam('onNavigateBack')}\n style={{ flex: 1, flexDirection: 'row', alignItems: 'center' }}\u003e\n \u003cIcon style={{ color: navColors.appleBlue, paddingTop: 3, fontSize: 34 }} name='ios-arrow-back' /\u003e\n \u003cText style={{ color: navColors.appleBlue, paddingLeft: 4, fontSize: 18 }} \u003eBack\u003c/Text\u003e\n \u003c/TouchableOpacity\u003e\n```\n\n\u003c/p\u003e\u003c/details\u003e\n\u003cbr\u003e\n\u003cdetails\u003e\u003csummary\u003eHidden UI Blocking Layer\u003c/summary\u003e\u003cp\u003e\n\n```jsx\n \u003cTouchableWithoutFeedback onPress={this.onForceLinkAlert}\u003e\n \u003cView style={{\n position: 'absolute',\n elevation: 10,\n right: 0,\n top: 0,\n height: 75,\n width: 75,\n opacity: 0,\n backgroundColor: colors.primary,\n borderColor: colors.primary,\n borderWidth: 1,\n borderRadius: 50,\n zIndex: 5,\n }}/\u003e\n \u003c/TouchableWithoutFeedback\u003e\n```\n\u003c/p\u003e\u003c/details\u003e\n\n\u003c/details\u003e\n\u003cbr\u003e\n\u003cdetails\u003e\u003csummary\u003eDiagonal Cut Linear Gradient\u003c/summary\u003e\u003cp\u003e\n\n```javascript\n const colorStart = '#FEFEFE'\n const colorMiddle = '#909090'\n const colorEnd = '#000000'\n\n\u003cLinearGradient\n style={[styles.card, {\n flexDirection: 'column',\n justifyContent: 'space-between',\n backgroundColor: colorStart,\n }]}\n colors={[colorStart, colorStart, colorMiddle, colorMiddle, colorEnd, colorEnd]}\n locations={[0, 0.45, 0.45, 0.75, 0.75, 1]}\n start={{ x: 0.00, y: 0.25 }}\n end={{ x: 0.035, y: 1 }}\u003e\n\n\u003c/LinearGradient\u003e\n```\n\u003c/p\u003e\u003c/details\u003e\n\u003cbr\u003e\n\u003cdetails\u003e\u003csummary\u003eSmooth iOS Status Bar Transitions\u003c/summary\u003e\u003cp\u003e\n\n```javascript\n // iOS Only - will switch back to light status bar on transition\n // Allows setting the status bar to the previous pages status bar color until\n // the end of the transition animation between screens\n blurListener = this.props.navigation.addListener(\n 'willBlur',\n () =\u003e {\n setNavigatingHome(false);\n }\n );\n\n focusListener = this.props.navigation.addListener(\n 'willFocus',\n () =\u003e {\n setNavigatingHome(true);\n }\n );\n\n```\n\u003c/p\u003e\u003c/details\u003e"},{"layout":"blog","name":"react","notes":"# React\n\n### Updates since I've heavily used it\n\n- react-router-redux has been deprecated and people use connected-react-router now to handle history in redux\n- favicon - xiconeditor.com"},{"layout":"blog","name":"rotation","notes":"# Thoughts On Rotation\n\n\n### Social\n- Zuckerberg never fails to [be a central point of failure](https://www.nytimes.com/2020/07/10/opinion/facebook-zuckerberg.html)\n\n- EOS Chat is another example for the [IM equivalent of a newsletter](https://apps.apple.com/us/app/eos-chat/id1434117290) and the failure to standardize messaging\n\n- Cluster is a virtual hangout growing in popularity in Japan [link](https://play.google.com/store/apps/details?id=mu.cluster.app\u0026hl=en_US)\n\n- Social 'biomes' and how they play into social satisfaction [link](https://www.psychologytoday.com/au/blog/the-athletes-way/201912/social-nourishment-restorative-solitude-human-thriving)\n\n### STEM\n- A better way to multiply [link](https://www.wired.com/story/mathematicians-discover-the-perfect-way-to-multiply/)\n\n- Copying content from a book to a presentation [using AR + ML](https://old.reddit.com/r/MachineLearning/comments/gh1dj9/project_from_books_to_presentations_in_10s_with/)\n\n### Digital Minimalism\n- Rending the web directly to a frame buffer [link](https://soosck.wordpress.com/2010/11/16/netsurf-graphical-web-browser-command-line-css/)\n\n- Comparison of the Apollo 11 Guidance System and [a USB-C charger](https://forrestheller.com/Apollo-11-Computer-vs-USB-C-chargers.html) \n\n- Configuration for linux on a [vt520](https://blog.w1r3.net/2019/12/24/linux-vt520.html)\n\n- Data integrity between [ZFS and BTRFS](https://www.unixsheikh.com/articles/battle-testing-data-integrity-verification-with-zfs-btrfs-and-mdadm-dm-integrity.html)\n\n- Building a Win 3.2 slack client [in 2019](https://yeokhengmeng.com/2019/12/building-a-new-win-3-1-app-in-2019-part-1-slack-client/)\n\n- Space invaders in C [link](https://blog.loadzero.com/blog/si78c/)\n\n- list of self-service, deployable SaaS [replacements](https://github.com/Atarity/deploy-your-own-saas)\n\n### Inclusive Architecture\n - Currently trending architecture documents lists, mostly undigestible unless willing to read at length [link](https://news.ycombinator.com/item?id=22011743)\n\n- Contemplating functional C [link](https://softwareengineering.stackexchange.com/questions/116863/can-you-learn-functional-programming-in-c)\n\n### No Code Movement\n- a product development firm that does not write code\n\n- [bubble.io pricing](https://bubble.io/pricing)\n\n### Open Source BaaS\n- docker containerized deployable BaaS [appwrite.io](https://appwrite.io)\n\n- supabase, a direct firebase competitor [link](https://supabase.io/)\n\n- parse lol we've come full circle [link](https://github.com/parse-community/parse-dashboard)\n\n### Self\n- Why one needs a [research blog](https://gregorygundersen.com/blog/2020/01/12/why-research-blog/)\n\n- Exercise facilitates brain plasticity [link](https://www.scientificamerican.com/article/why-your-brain-needs-exercise/)\n\n- [Keto Coconut Bread receipt](https://onandoffketo.com/wprm_print/3155)\n\n### Games\n- Pixel art in gimp [link](https://peppe.rs/posts/pixel_art_in_GIMP/)\n\n- Building a custom game hardware PCB and homage to the old Comanche games [link](https://craigjb.com/2019/11/26/gameslab-overview/)\n\n### Prepping + Climate\n- The science of [tunneling](http://www.umich.edu/~gs265/tunnel.htm)\n\n- Ordering bulk lettuce [seeds](https://www.johnnyseeds.com/vegetables/lettuce/dragoon-organic-lettuce-seed-3884G.html?cgid=lettuce#prefn1=prod_feature_grow_cond\u0026prefv1=110\u0026start=1) \n\n- Current climate status as worst case scenario is actually being [modeled correctly](https://climate.nasa.gov/news/2943/study-confirms-climate-models-are-getting-future-warming-projections-right/)\n\n- A charity towards solving [climate change](https://citizensclimatelobby.org/join-citizens-climate-lobby/?tfa_3590416195188=reddit-CarbonTax\u0026utm_source=reddit\u0026utm_medium=referral\u0026utm_campaign=CarbonTax)\n\n- A UPenn groups plan for sustainability towards 2100 [link](https://mcharg.upenn.edu/2100-project-atlas-green-new-deal)\n\n- A redditor who built a huge bunker for a client under the guise of a below ground pool [link](https://old.reddit.com/r/preppers/comments/d3y2k9/180ft_x_70ft_bunker_i_designed_is_being_built/)\n\n- 'Why the future is really grim' from DarkFuturology, [a wonderful compilation](https://old.reddit.com/r/DarkFuturology/comments/e8ahfs/why_the_future_is_really_grim/)\n\n### Politics\n- Trump continuing to be concerned with previous administrations that seemingly encountered [disasters from 2020](https://theweek.com/speedreads-amp/925307/trump-complains-biden-obama-stopped-coronavirus-testing-even-though-didnt-exist-during-administration)\n"},{"layout":"blog","name":"rust","notes":"## Notes on Rust\n\n* GUI standard or best practice [seems fragmented](https://raphlinus.github.io/ui/druid/2019/11/22/reactive-ui.html)\n * [moxie](https://blog.anp.lol/rust/moxie-intro/)\n * [druid](https://github.com/xi-editor/druid)\n\n* Would be preferred over flutter, in terms of accessibility and portability, if the developer experience was more straight forward\n* It's already hard to sell dart/flutter as inclusive and friendly to web devs"},{"layout":"blog","name":"uarch","notes":"# Microarchitecture and some\n\n## Memory\n - [An overview of direct memory access](https://geidav.wordpress.com/2014/04/27/an-overview-of-direct-memory-access/)"}]},"__N_SSG":true},"page":"/things/[thing]","query":{"thing":"linux"},"buildId":"1Bg7mSQx5DTKYMg5h_BW8","nextExport":false,"isFallback":false,"gsp":true}</script><script nomodule="" src="/_next/static/runtime/polyfills-1c161e633660818aa2c3.js"></script><script async="" data-next-page="/_app" src="/_next/static/1Bg7mSQx5DTKYMg5h_BW8/pages/_app.js"></script><script async="" data-next-page="/things/[thing]" src="/_next/static/1Bg7mSQx5DTKYMg5h_BW8/pages/things/%5Bthing%5D.js"></script><script src="/_next/static/runtime/webpack-c212667a5f965e81e004.js" async=""></script><script src="/_next/static/chunks/framework.e84fa698c7ee940652bd.js" async=""></script><script src="/_next/static/chunks/commons.cd1d905a091c18dfc07d.js" async=""></script><script src="/_next/static/runtime/main-d59bc759ed203cff8b2c.js" async=""></script><script src="/_next/static/chunks/f2c9f8f9cf1d99b2946cba4c88e3eb1b4292f23b.d0e7a4513fbb886dc286.js" async=""></script><script src="/_next/static/1Bg7mSQx5DTKYMg5h_BW8/_buildManifest.js" async=""></script><script src="/_next/static/1Bg7mSQx5DTKYMg5h_BW8/_ssgManifest.js" async=""></script></body></html><script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script>