Skip to content

Instantly share code, notes, and snippets.

View copyleftdev's full-sized avatar

Don Johnson copyleftdev

View GitHub Profile
@copyleftdev
copyleftdev / index.html
Created October 25, 2022 04:15
Responsive hamburger menu - pure CSS #1
<header class="header">
<a href="" class="logo">CSS Nav</a>
<input class="menu-btn" type="checkbox" id="menu-btn" />
<label class="menu-icon" for="menu-btn"><span class="navicon"></span></label>
<ul class="menu">
<li><a href="#work">Our Work</a></li>
<li><a href="#about">About</a></li>
<li><a href="#careers">Careers</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
@copyleftdev
copyleftdev / workflow.yml
Created April 22, 2024 16:00
Advanced GitHub Action Script for Stale Pull Request Management
name: Mark stale pull requests in Shepherd repo
on:
schedule:
- cron: '0 0 * * 1' # Runs every Monday at midnight
jobs:
stale:
runs-on: ubuntu-latest
timeout-minutes: 5
@copyleftdev
copyleftdev / cheat-sheet.md
Created August 24, 2024 06:44
Ultimate Linux Terminal Tricks Cheatsheet

πŸš€ Ultimate Linux Terminal Tricks Cheatsheet

🧭 Navigation Ninja

Command Description
cd - πŸ”™ Teleport to previous directory
pushd <dir> πŸ“š Change directory, save current to stack
popd πŸ“š Return to most recently pushed directory
cd ~ 🏠 Go to home directory
@copyleftdev
copyleftdev / ssh-mastery.md
Created August 24, 2024 06:47
SSH Mastery: The Ultimate Guide

πŸ” SSH Mastery: The Ultimate Guide

🌟 Basic SSH Commands

Command Description
ssh user@hostname πŸ”Œ Connect to a remote host
ssh -p 2222 user@hostname πŸ”’ Connect using a specific port
ssh -i ~/.ssh/id_rsa user@hostname πŸ”‘ Connect using a specific identity file
exit or logout πŸ‘‹ Terminate the SSH session
@copyleftdev
copyleftdev / chaining.md
Created August 24, 2024 06:49
Bash Command Chaining Mastery: The Ultimate Cheat Sheet

πŸ”— Bash Command Chaining Mastery: The Ultimate Cheat Sheet

πŸ”— Basic Command Chaining

Operator Description Example
; πŸ“Š Run commands sequentially echo "Hello"; echo "World"
&& βœ… Run next command only if previous succeeds mkdir dir && cd dir
|| ❌ Run next command only if previous fails ping -c1 google.com || echo "Offline"
| 🚿 Pipe output of one command to another ls -l | grep ".txt"
@copyleftdev
copyleftdev / parallel.md
Created August 24, 2024 06:51
GNU Parallel Mastery: The Ultimate Cheat Sheet

πŸš€ GNU Parallel Mastery: The Ultimate Cheat Sheet

πŸ“Š Basic Usage

Command Description Example
parallel echo ::: A B C πŸ”€ Process items in parallel Output: A, B, C (in any order)
parallel echo {} ::: *.txt πŸ” Use {} as placeholder Echoes names of all .txt files
cat file.txt | parallel echo πŸ“₯ Read input from stdin Processes each line of file.txt
parallel -j4 command ::: item1 item2 item3 πŸ”’ Limit to 4 jobs at a time Runs 'command' on items, max 4 parallel
@copyleftdev
copyleftdev / logs.md
Created August 24, 2024 06:53
Log Analysis Mastery: The Ultimate Cheat Sheet

πŸ“Š Log Analysis Mastery: The Ultimate Cheat Sheet

πŸ“œ Basic Log Viewing

Command Description Example
cat πŸ“„ Display entire log file cat /var/log/syslog
less πŸ“ƒ View log file with pagination less /var/log/auth.log
tail πŸ”š View end of log file tail /var/log/apache2/access.log
head πŸ” View beginning of log file head /var/log/mysql/error.log
@copyleftdev
copyleftdev / gist:be99c8be50e2119a979aa275fe165e8d
Created August 24, 2024 06:56
Linux Penetration Testing with GNU Utils: The Ultimate Cheat Sheet

🐧 Linux Penetration Testing with GNU Utils: The Ultimate Cheat Sheet

DISCLAIMER: This information is for educational purposes only. Always obtain proper authorization before performing any penetration testing activities. Unauthorized testing is illegal and unethical.

πŸ” Information Gathering

Command Description Example
netstat 🌐 Network connections, routing tables, interface statistics netstat -tuln
ss πŸ”Œ Socket statistics ss -tuln
@copyleftdev
copyleftdev / tail.md
Created August 24, 2024 06:58
The Ultimate Tail Command Guide

πŸ“œ The Ultimate Tail Command Guide

πŸš€ Basic Usage

Command Description Example
tail file.txt πŸ“„ Display the last 10 lines of a file tail /var/log/syslog
tail -n 20 file.txt πŸ”’ Display the last 20 lines of a file tail -n 20 /var/log/auth.log
tail -c 100 file.txt πŸ“ Display the last 100 bytes of a file tail -c 100 /etc/passwd