Skip to content

Instantly share code, notes, and snippets.

@githubfoam
githubfoam / microsoft visual studio code cheat sheet
Last active August 8, 2025 11:59
microsoft visual studio code cheat sheet
------------------------------------------------------------------------------------------
Step-by-Step Guide: Creating a GitHub Repository and Uploading Files from VS Code
This guide will walk you through the process of creating a new GitHub repository and then using Visual Studio Code (VS Code) on Windows 10 to upload your workflow and PowerShell script.
Part 1: Create a New GitHub Repository
First, you need to create a place for your files on the GitHub website.
Go to GitHub: Open a web browser and go to https://github.com/.
@githubfoam
githubfoam / ssh lab
Last active December 22, 2023 10:57
sshblab
--------------------------------------------------------------------------------------------------------------------------
#To create a user on an Ubuntu server and set up passwordless SSH access using a private key from a Windows 10 desktop, follow these steps:
Ubuntu 22.04.3 LTS
Windows 11 Desktop
On Windows 11 Desktop:
Generate SSH Key Pair (if not already generated):
@githubfoam
githubfoam / windows forensics cheat sheet
Last active May 7, 2026 08:51
windows forensics cheat sheet
============================================================================
https://www.sans.org/tools/
============================================================================
FTK Imager, ANJP, EZ Tools, SIFT, Regripper, Windows Event Log Explorer, Volatility, Plaso, DensityScout, SigCheck
============================================================================
Live System Analysis for computers with Windows 10 operating system with tools such as Sysinternals, Powershell, WM
Collecting triage data and parsing methods with KAPE
Physical Imaging with FTK Imager
Logical Imaging with FTK Imager
Memory Imaging with FTK Imager, DumpIT, WinPmem
@githubfoam
githubfoam / awk cheat sheet
Last active December 14, 2022 07:29
awk cheat sheet
----------------------------------------------------------------------------------------------------
NF is a predefined variable whose value is the number of fields in the current record
parse fields by field separator FS (default single space)
----------------------------------------------------------------------------------------------------
#string match,tab delimited file, starting with any of letter A,C,T,G ending with forward slash
$ cat test.txt
id1 342 C/T
id2 7453 T/A/-/G/C
id3 531 T/C
@githubfoam
githubfoam / go scripting cheat sheet
Created March 25, 2022 06:40
go scripting cheat sheet
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
#hello_world.go
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
@githubfoam
githubfoam / ruby scripting cheat sheet
Last active April 11, 2022 08:28
ruby scripting cheat sheet
------------------------------------------------------------------------------------------
$ cat app.rb
puts "Type your name :"
name = gets.chomp
puts "Hello world " + name
$ ruby app.rb
Type your name :
------------------------------------------------------------------------------------------
@githubfoam
githubfoam / python script cheat sheet
Last active March 23, 2026 03:33
python script cheat sheet
------------------------------------------------------------------------------------------
python3 -V
python2 -V
------------------------------------------------------------------------------------------
#Command-line one-liners
# -c run Python script sent in as cmd string
python -c "print(3.0/2)"
python -c "import math;print(math.sin(1))"
python -c "for i in range(1,5):print(i)"
@githubfoam
githubfoam / perl script cheat sheet
Last active December 14, 2022 06:17
perl script cheat sheet
-----------------------------------------------------------------------------------------------------
perl -p -i -e -> Alter specific lines in files,
works on multiple files out of the box,even if it encounters a problem with one of the files
“perl pie” command
perl -p -i -e 's/127\.0\.0\.1/0.0.0.0/g' * -> "127.0.0.1" is replaced with "0.0.0.0."
perl -p -i -e 's#ORIGINAL#NEW_VALUE#' myfile1 myfile2 #replace a string on one or more files
------------------------------------------------------------------------------------------------------------------
perl -le 'map { $sum += -s } @ARGV; print $sum' -- *.pdf #total size of all non-hidden PDF files in current directory
perl -le 'map { $sum += -s } @ARGV; print $sum' -- /var/log/apt/*.log
@githubfoam
githubfoam / openstack end user cheat sheet
Last active June 21, 2022 11:59
openstack end user cheat sheet
---------------------------------------------------------------------------------------------------
Openstack Panel - Dashboard Horizon
Network-Networks-Create Network
Network-Network Name-testnetwork
Subnet-Subnet Name-testnetwork_subnet
Subnet-Network Address-10.66.35.0/24
Subnet-Gateway IP-10.66.35.1
Create
@githubfoam
githubfoam / ubuntu server experience
Last active May 20, 2025 06:21
ubuntu server experience
----------------------------------------------------------------------------------------------------
#ubuntu server
----------------------------------------------------------------------------------------------------
#vmware workstation user authentication easy install bug, skip it
----------------------------------------------------------------------------------------------------
apt-get install tasksel
#Select a Display Manager, GDM3 lightdm SDDM SLiM
apt-get install lightdm
#Choose a GUI, ubuntu-mate-core,lubuntu-core
tasksel