Skip to content

Instantly share code, notes, and snippets.

@MBing
MBing / install_wlan_dongle.sh
Last active April 3, 2024 05:20
install TP-Link-WN725N Nano USB Wifi on Raspberry Pi with Kernel 5.10+
# DO NOT PUT THE WIFI DONGLE IN THE DEVICE BEFORE MENTIONED EXPLICITLY BELOW
# Brief note, after this the UI will not show the usb dongle,
# the wifi does work and I get an IP address, so all works,
# but I don't go into detail of making it show on the Raspbian UI.
# (for this purpose I don't care about the UI)
# For the use of this I connected my device to an ethernet connection and through the Router could see the IP which I can SSH into.
## STEP 1: Prepare machine and install packages needed
@laggardkernel
laggardkernel / startup-time-of-zsh.md
Last active April 12, 2024 13:24
Comparison of ZSH frameworks and plugin managers

Comparison of ZSH frameworks and plugin managers

Changelog

  • update 1: add a FAQ section
  • update 2: benchmark chart and feature comparison table
  • update 3:
    • improve the table with missing features for antigen
    • new zplg times result

TLDR

@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 9, 2024 07:54
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@nathansobo
nathansobo / log-linear-goto-intuition.md
Last active June 27, 2019 08:11
Intuition for `merge_op` in Raph Levein's GOTO implementation

When merging an operation O, there may be several operations scattered through the local history that are concurrent to O. We need to rearrange our history so that all of these concurrent operations are moved to the end of the history. Then we can transform O against each of these concurrent operations and append it to the end.

Say we're adding O a history with the following suffix. The operations surrounded by vertical bars are concurrent to O. Otherwise the operations causally precede O.

EO0 |EO1| EO2 EO3 |EO4| |EO5| EO6

We need to rearrange this history so it looks like this.

@snoyberg
snoyberg / README.md
Last active August 22, 2019 17:35
Docker testing of edge cases with containers

There are a number of corner cases to consider when dealing with Docker, multiple processes, and signals. Probably the most famous post on this matter is from the Phusion blog. Here, we'll see some examples of how to see these problems first hand, and one way to work around it.

The Phusion blog post recommends using their baseimage-docker. We ran into problems with Phusion's usage of syslog-ng, in particular with it creating

@idibidiart
idibidiart / GraphQL-Architecture.md
Last active September 16, 2023 18:36
Building an Agile, Maintainable Architecture with GraphQL

Building a Maintainable, Agile Architecture for Realtime, Transactional Apps

A maintainable application architecture requires that the UI only contain the rendering logic and execute queries and mutations against the underlying data model on the server. A maintainable architecture must not contain any logic for composing "app state" on the client as that would necessarily embed business logic in the client. App state should be persisted to the database and the client projection of it should be composed in the mid tier, and refreshed as mutations occur on the server (and after network interruption) for a highly interactive, realtime UX.

With GraphQL we are able to define an easy-to-change application-level data schema on the server that captures the types and relationships in our data, and wiring it to data sources via resolvers that leverage our db's own query language (or data-oriented, uniform service APIs) to resolve client-specified "queries" and "mutations" against the schema.

We use GraphQL to dyn

@tonymtz
tonymtz / gist:714e73ccb79e21c4fc9c
Created November 15, 2014 00:02
Uninstall XQuartz.app from OSX Yosemite
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
sudo pkgutil --forget org.macosforge.xquartz.pkg
# Log out and log in
@Chaser324
Chaser324 / GitHub-Forking.md
Last active April 25, 2024 04:57
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@KartikTalwar
KartikTalwar / Documentation.md
Last active April 13, 2024 23:09
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
anonymous
anonymous / AppleWKHelper.ahk
Created December 15, 2012 12:28
AutoHotkey script from Billy TK Functions..: Make Apple Wireless Keyboard useful in MS Windows: - EJECT = Delete with repeat deleting on long pressing. Shift-DEL and other combinations works too. - Swap FN & left Control - FN-functions оn F3-F12 keys and arrow keys (use new-FN) - FN+EJECT = drive eject - F12 = INSERT (on your need, it simple to …
;
; AutoHotkey Version: 1.x
; Language.........: English
; Platform.........: NT/XP/Vista
; Author...........: mrBTK
;
; Script Function..: Make Apple Wireless Keyboard useful in MS Windows:
; - EJECT = Delete with repeat deleting on long pressing. Shift-DEL and other combinations works too.
; - Swap FN & left Control
; - FN-functions оn F3-F12 keys and arrow keys (use new-FN)