Discover gists
This file contains 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
The first command uninstalls updates and clears data. | |
The second command uninstalls the system app all together. | |
Run commands in this order to get rid of YouTube forever. | |
-- | |
adb uninstall com.google.android.youtube | |
adb shell pm uninstall --user 0 com.google.android.youtube |
This file contains 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
import SwiftUI | |
struct SqureFlowView: View { | |
@StateObject private var holder = SquresHolder() | |
var body: some View { | |
TimelineView(.animation) { timeline in | |
Canvas { context, size in | |
holder.update(at: timeline.date, in: size) | |
for item in holder.squre { |
This file contains 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
// the cache version gets updated every time there is a new deployment | |
const CACHE_VERSION = 10; | |
const CURRENT_CACHE = `main-${CACHE_VERSION}`; | |
// these are the routes we are going to cache for offline support | |
const cacheFiles = ['/', '/about-me/', '/projects/', '/offline/']; | |
// on activation we clean up the previously registered service workers | |
self.addEventListener('activate', evt => | |
evt.waitUntil( |
This file contains 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
# https://stackoverflow.com/a/77768997/227260 | |
CONDA_DIR="$HOME/anaconda3" | |
CONDA_DIR_BAK="${CONDA_DIR}_bak" | |
# Miniconda: https://docs.anaconda.com/free/miniconda/miniconda-other-installer-links/ | |
# Anaconda: https://repo.anaconda.com/archive/ | |
CONDA_INSTALL_SHELL="https://repo.anaconda.com/archive/Anaconda3-2024.02-1-Linux-x86_64.sh" | |
# Check if backup directory exists and move if it does not |
This file contains 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
# fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort) | |
fshow() { | |
local out shas sha q k | |
while out=$( | |
git log --graph --color=always \ | |
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | | |
fzf --ansi --multi --no-sort --reverse --query="$q" \ | |
--print-query --expect=ctrl-d --toggle-sort=\`); do | |
q=$(head -1 <<< "$out") | |
k=$(head -2 <<< "$out" | tail -1) |
Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:
Up Arrow
: Will show your last commandDown Arrow
: Will show your next commandTab
: Will auto-complete your commandCtrl + L
: Will clear the screen
This file contains 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
# https://github.com/wei/pull#readme | |
--- | |
version: "1" | |
rules: | |
- base: main | |
upstream: pythoninthegrass:main | |
mergeMethod: hardreset # Optional, one of [none, merge, squash, rebase, hardreset], Default: none. | |
mergeUnstable: false # Optional, merge pull request even when the mergeable_state is not clean. Default: false |
This file contains 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
var net = require('net'); | |
var socket = new net.Socket(); | |
socket.connect(5000, "127.0.0.1"); | |
var fs = require('fs'); | |
var path = require('path'); | |
var packets = 0; | |
var buffer = new Buffer(0); | |
socket.on('data', function(chunk){ | |
packets++; |
NewerOlder