Skip to content

Instantly share code, notes, and snippets.

@eddy-22
eddy-22 / wget.sh
Created August 23, 2020 16:48 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@eddy-22
eddy-22 / gitget.py
Created December 23, 2020 01:05 — forked from divs1210/gitget.py
Download a specific folder from a github repo
#!/usr/bin/python
"""
Download a specific folder from a github repo:
gitget.py https://github.com/divs1210/kilvish/tree/master/examples/bricksnball
"""
__author__ = 'Divyansh Prakash'
import sys
import subprocess
@eddy-22
eddy-22 / ve.sh
Last active June 14, 2021 02:15 — forked from erszk/ve.sh
[VE.sh] virtualenv wrapper in bash #virtualenv #shell
# -*- mode: sh -*-
# vim: syn=sh
# check to make sure virtualenv installed
if ! command which -s virtualenv; then
>&2 echo "You don't have virtualenv installed in your path. To install it:"
>&2 echo "pip install virtualenv"
return 1
fi

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r

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]}

tmux/tmuxinator cheatsheet

tmux

As configured in my dotfiles, here and here.

Command line

$ tmux                           -> start new
$ tmux new -s myname             -> start new w/session name
$ tmux a  #  (or at, or attach)  -> attach
$ tmux a -t myname               -> attach to named
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if Vagrant.has_plugin?("vagrant-proxyconf")
@eddy-22
eddy-22 / Readme.md
Created July 5, 2021 13:38 — forked from Touexe/Readme.md
youtube-dl and yt-dlp best commands

Youtube-dl

youtube-dl -f best --ignore-errors --no-mtime --embed-thumbnail -o %%(title)s.%%(ext)s --merge-output-format mp4 --external-downloader aria2c --external-downloader-args "-c -j 16 -x 16 -s 16 -k 2M" URL

Yt-dlp

yt-dlp -f best -c --ignore-errors --no-mtime --embed-subs --embed-thumbnail -o %%(title)s.%%(ext)s --add-metadata --merge-output-format mp4 --downloader aria2c --downloader-args "-c -j 16 -x 16 -s 16 -k 2M" URL

@eddy-22
eddy-22 / Vagrantfile
Created August 15, 2021 23:57 — forked from mike-hearn/Vagrantfile
Multi-machine Vagrant config with private networking
# -*- mode: ruby -*-
# vi: set ft=ruby :
boxes = [
{
:name => "server1",
:eth1 => "192.168.205.10",
:mem => "1024",
:cpu => "1"
@eddy-22
eddy-22 / github-actions-notes.md
Created September 16, 2021 02:22 — forked from br3ndonland/github-actions-notes.md
Getting the Gist of GitHub Actions