Skip to content

Instantly share code, notes, and snippets.

View darkgeek's full-sized avatar
🎯
Focusing

Justin Yang darkgeek

🎯
Focusing
View GitHub Profile
@danpawlik
danpawlik / Setup-GSI-Image.md
Last active May 8, 2024 11:59
Flashing GSI on Xiaomi Mi 11T Pro (vili) treble phhusson

Installation

Steps:

With computer

  1. Unlock bootloader
  2. sudo fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img (stock or google)
  3. sudo fastboot erase system
  4. sudo fastboot flash system Gsi.img
  5. If you have an error in step 5 "not enough space to resize partition": sudo fastboot delete-logical-partition product_b (if fastboot getvar all "current-slot" is a, run: sudo fastboot delete-logical-partition product_a - https://www.droidwin.com/fix-failed-remote-not-enough-space-to-resize-partition/)
@nepsilon
nepsilon / speed-is-a-feature-10-tips-faster-browser-networking.md
Created September 6, 2016 05:31
Speed is a feature: 10 tips for faster browser networking — First published in fullweb.io issue #64

Speed is a feature: 10 tips for faster browser networking

1. Minimize TCP connections

Ensure the web server uses Keep-Alive headers.

2. Reduce DNS look-ups

DNS look-ups are the first thing blocking your HTTP requests.

@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active May 21, 2024 11:37
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@bendavis78
bendavis78 / gist:827089ff8f2a8d8975ee
Last active May 29, 2022 17:01
Installing Arch Linux on Chromebook Pixel 2
@alganet
alganet / serve.sh
Last active July 17, 2020 05:42
Serve any folder as a web server with $ curl -L http://tinyurl.com/servesh1 | sh
#!/usr/bin/env sh
# serve.sh
# Modular version: https://gist.github.com/alganet/a22a1373dcee7c175d1e
# Expansion on zsh
command -v setopt 2>&1 >/dev/null && setopt SH_WORD_SPLIT
# POSIX on bash
export POSIXLY_CORRECT=1
# Lists files and folders as HTML
@awidegreen
awidegreen / promiscuous@.service
Created July 16, 2013 13:21
systemd service for promiscuous mode. On archlinux, store it under /etc/systemd/system/promiscuous@.service enable it with: systemctl enable promiscuous@enp1s0.service Difference between file from archwiki: add "After" and changed path from "/usr/sbin/ip" to "/usr/bin/ip" since every executable is now located there
[Unit]
Description=Set %i interface in promiscuous mode
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/bin/ip link set dev %i promisc on
RemainAfterExit=yes
[Install]
@lichray
lichray / kindle.tcsh
Created October 18, 2012 02:55
A tcsh alias to control Kindle on FreeBSD
# usage: kindle eject|start
# The 'start' command works for Kindle, but I saw an error message.
# However, I'm not silencing it here.
alias kindle 'camcontrol devlist | grep Kindle |'\
'sed -nE '\''s/^.*(pass[[:digit:]]+).*$/\1/p'\'' |'\
'xargs -J% camcontrol \!:1 % -E'
# Any brief command of camcontrol(8) is supported actually; 'eject'
# and 'start' are enough.
complete kindle 'p/1/(eject start)/'
@lotem
lotem / luna_pinyin.custom.yaml
Last active May 29, 2021 13:21
在【朙月拼音】裏使用Emoji表情(這份配置已過時,新的emoji實現代碼在 https://github.com/rime/rime-emoji
# luna_pinyin.custom.yaml
#
# 在【朙月拼音】裏使用Emoji表情(這份配置已過時,新的emoji實現代碼在 https://github.com/rime/rime-emoji )
#
# 保存到Rime用戶文件夾後,重新部署生效
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
#
# 如果目標文件已經包含其他修改內容,只需按照縮進合併 patch: 以下的部分

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: