Skip to content

Instantly share code, notes, and snippets.

View i3p9's full-sized avatar
🐢
speed

Fahim i3p9

🐢
speed
View GitHub Profile

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@theychx
theychx / ytdl_totalsize.py
Last active October 2, 2023 08:31
Script that uses youtube-dl to calculate total size of all videos in a playlist (also works with single videos). Now at this repo: https://github.com/theychx/totalsize
#! /usr/bin/env python3
import math
import sys
import youtube_dl
BEST_FORMAT = "bestvideo+bestaudio/best"
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active September 20, 2024 12:40
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@joshenders
joshenders / mitmproxy.md
Last active July 23, 2023 14:49
mitmproxy configuration for iPad

Successful mitmproxy-3.7 setup tested on OS X 10.13.6 and iPhone X running 12.1.4

Enable IP forwarding and disable ICMP redirects to keep the iPad sending traffic to the proxy

sudo sysctl -w net.inet.ip.forwarding=1
sudo sysctl -w net.inet.ip.redirect=0

net.inet.ip.forwarding
Enable IP forwarding between interfaces

@SantoshSrinivas79
SantoshSrinivas79 / Inject javascript into HTML pages from console.md
Last active May 12, 2021 05:51
Inject javascript into HTML pages from console

#Inject javascript into HTML pages from console

An easy way to inject Javascripts into the current loaded dom using the developer console in chrome.

jQuery

var script = document.createElement('script');
script.src = 'http://code.jquery.com/jquery-1.7.2.min.js';
@sunng87
sunng87 / lighttpd.conf
Created May 28, 2011 01:00
Share directory with lighttpd
server.document-root="/your/path/to/share"
server.port = 8099
#server.bind = "192.168.1.100"
dir-listing.activate = "enable"
@orangain
orangain / link_to_stack_overflow.user.js
Created January 31, 2011 08:00
A greasemonkey script to replace a link to copy site of Stack Overflow with a link to the original page