Skip to content

Instantly share code, notes, and snippets.

View CypherpunkSamurai's full-sized avatar
😶
Currently Busy 🌻🐢

Cypherpunk Samurai CypherpunkSamurai

😶
Currently Busy 🌻🐢
View GitHub Profile
@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active April 14, 2025 15:08
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@glen-cheney
glen-cheney / encoding-video.md
Last active November 24, 2024 10:09
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@caetanus
caetanus / bencode.cpp
Last active August 10, 2021 19:39
Qt Bencode and Decoder and Torrent Creator
#include "bencode.h"
BEncode::BEncode()
: m_decodeError{ false }
{
}
QByteArray BEncode::encode(QVariant value)
{
return encodeVariant(value);
@jamesrr39
jamesrr39 / Golang program stdin stdout interaction.md
Last active July 12, 2023 18:21
Using stdout and stdin from other programs in Golang

Go program interaction

Example of how to use stdout and stdin from other programs in golang

Requires go

Run

go run parentprocess.go
@xxdesmus
xxdesmus / wget.txt
Created September 28, 2015 20:03 — forked from suzannealdrich/wget.txt
wget spider cache warmer
wget --spider -o wget.log -e robots=off -r -l 5 -p -S --header="X-Bypass-Cache: 1" live-mysite.gotpantheon.com
# Options explained
# --spider: Crawl the site
# -o wget.log: Keep the log
# -e robots=off: Ignore robots.txt
# -r: specify recursive download
# -l 5: Depth to search. I.e 1 means 'crawl the homepages'.  2 means 'crawl the homepage and all pages it links to'...
# -p: get all images, etc. needed to display HTML page
# -S: print server response
@saeidzebardast
saeidzebardast / youtube-dl-playlist
Last active April 29, 2022 16:12
Download Youtube playlist in a folder and indexing videos using youtube-dl
alias youtube-dl-playlist="youtube-dl --ignore-errors --output '%(playlist)s/%(playlist_index)s- %(title)s.%(ext)s'"
@mondwan
mondwan / about.md
Last active October 24, 2023 07:16
HTTP request with netcat or openssl

About

This is a document about how to test HTTP requests by running openssl or nc

example_post_req.txt

  • Edit payload, pathanme, ip etc

Openssl

@keijiro
keijiro / transfer.sh
Created December 24, 2015 10:36
Transferring a repository from GitHub to BitBucket.
git clone --mirror https://github.com/keijiro/Foobar.git
git remote set-url --push origin https://[email protected]/keijiro/Foobar
git push --mirror
@mslinn
mslinn / decompile.bat
Last active April 22, 2025 07:05
Decompile JVM class files using IntelliJ IDEA's embedded FernFlower decompiler
java -cp "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.2\plugins\java-decompiler\lib\java-decompiler.jar" org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler -dgs=true . src
@nepsilon
nepsilon / how-to-git-patch-diff.md
Last active April 24, 2025 10:08
How to generate and apply patches with git? — First published in fullweb.io issue #33

How to generate and apply patches with git?

It sometimes happen you need change code on a machine from which you cannot push to the repo. You’re ready to copy/paste what diff outputs to your local working copy.

You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:

1. Generate the patch:

git diff &gt; some-changes.patch