Skip to content

Instantly share code, notes, and snippets.

@safaorhan
safaorhan / uninstall-youtube.txt
Created July 6, 2023 06:28
How to uninstall YouTube app via adb
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
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 {
@JMPerez
JMPerez / service-worker.js
Created October 27, 2018 20:21
An example of a service worker for serving network first, cache second
// 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(
@ashishsoniii
ashishsoniii / GSoC_TOR.md
Last active May 4, 2024 05:17
Explore my Google Summer of Code journey with The Tor Project. Check out my final report summarizing my contributions & coding.🚀

Google Summer of Code 2023 Final Report - Tor’s SnowFlake: Revitalising Snowflake's Landing Page for a Better User Experience

👤 Contributor: Ashish Soni

🤝 Mentor: Raya, Donuts

⚙️ Organization: The Tor Project

🚀 Repository: Snowflake

@chrisbraddock
chrisbraddock / anaconda-clean-base.sh
Created May 2, 2024 18:04
Reset Anaconda / Miniconda Base Environment
# 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
@junegunn
junegunn / gist:f4fca918e937e6bf5bad
Last active May 4, 2024 05:07
Browsing git commit history with fzf
# 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)
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 4, 2024 05:06
set -e, -u, -o, -x pipefail explanation
@bradtraversy
bradtraversy / terminal-commands.md
Last active May 4, 2024 05:05
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

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 command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen
@pythoninthegrass
pythoninthegrass / pull.yml
Created May 4, 2024 04:58
GitHub app Pull
# 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
@jcarroyo
jcarroyo / client.js
Created April 6, 2016 02:09
Node.js send file with pure socket (low level transfer)
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++;