Skip to content

Instantly share code, notes, and snippets.

View TrevCan's full-sized avatar
🖖

Hector Canizales TrevCan

🖖
View GitHub Profile
#!/usr/bin/env python3
"""
A userscript to display all things running on localhost.
Either that or to open up a localhost given a port as input.
"""
import os
from shlex import join
import psutil
from jinja2 import Template
@valosekj
valosekj / string_manipulation.md
Last active November 1, 2025 01:58
Useful string manipulation examples for bash and zsh #blog

Useful string manipulation examples for bash and zsh

I need very often to modify filenames or replace/delete their parts across huge number of files. I was using sed command for these purposes but recently I have found out that all these tasks can be easily done directly in bash (or zsh) because both of them support so called string manipulation operations.

String manipulations

Define some example string:

$ file=some_file_name.txt
@tjluoma
tjluoma / youtube-rss.sh
Last active May 31, 2025 20:28
Did you know YouTube has RSS feeds? No? Probably because YouTube makes them nearly impossible to find. But here's an easy way to get the RSS feed for any YouTube user. Inspired by <https://eggfreckles.net/notes/youtube-rss/>
#!/usr/bin/env zsh -f
# Purpose: get the RSS feed for a YouTube page
# Inspired By: https://eggfreckles.net/notes/youtube-rss/
# Gist: https://gist.github.com/tjluoma/fdbc63ceb78a2aecd3d638fd18b6ec6e
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2020-01-17; updated 2021-01-10
# 2021-01-10 YouTube currently has both 'rssUrl' and
@ofyalcin
ofyalcin / $250 DigitalOcean Coupon Code - $250 DigitalOcean Credit - DigitalOcean Promo Code 2023.md
Last active April 9, 2025 00:47
$250 DigitalOcean Coupon Code - $250 DigitalOcean Credit - DigitalOcean Promo Code 2023

DigitalOcean Coupon Code.md

Hi everyone.

Today I will show you how to earn $200+$50 free credit for digitalocean.

Lets start.

Dont forget, you must have a new account on digitalocean for earn $250 coupon code.

@steven2358
steven2358 / ffmpeg.md
Last active December 2, 2025 03:29
FFmpeg cheat sheet
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active November 30, 2025 16:27
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
This work, excluding the Arch Linux logo, is made available under CC0: https://creativecommons.org/publicdomain/zero/1.0/
@ethack
ethack / TypeClipboard.md
Last active October 20, 2025 01:34
Scripts that simulate typing the clipboard contents. Useful when pasting is not allowed.

It "types" the contents of the clipboard.

Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.

  • One example is in system password fields on OSX.
  • Sometimes you're working in a VM and the clipboard isn't shared.
  • Other times you're working via Remote Desktop and again, the clipboard doesn't work in password boxes such as the system login prompts.
  • Connected via RDP and clipboard sharing is disabled and so is mounting of local drives. If the system doesn't have internet access there's no easy way to get things like payloads or Powershell scripts onto it... until now.

Windows

The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.

@tanyuan
tanyuan / smart-caps-lock.md
Last active November 30, 2025 15:58
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.
@alirobe
alirobe / reclaimWindows10.ps1
Last active December 6, 2025 06:24
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security