Skip to content

Instantly share code, notes, and snippets.

View pouyaSamie's full-sized avatar
🎯
Focusing

pouya samie pouyaSamie

🎯
Focusing
View GitHub Profile
@pouyaSamie
pouyaSamie / gitChangeUser.sh
Created February 7, 2023 10:07
Change github user based on ssh key
#!/bin/bash
currentUser=$(whoami)
files=$(sudo find /home/$currentUser/.ssh -type f)
count=0
for file in $files; do
email=$(sudo grep -o '\b[A-Za-z0-9._%+-]\+@[A-Za-z0-9.-]\+\.[A-Za-z]\{2,\}\b' "$file")
if [ -n "$email" ]; then
email_list[count]=$email
@pouyaSamie
pouyaSamie / GoogleDorking.md
Created April 12, 2022 07:31 — forked from sundowndev/GoogleDorking.md
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@pouyaSamie
pouyaSamie / squid.conf
Created February 17, 2020 06:58
Squid 3 config with simple Authentication and allowing Spotify through proxy
#
# Recommended minimum configuration:
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
@pouyaSamie
pouyaSamie / color.css
Created February 5, 2020 14:16
Kubuntu Terminal tab color for breez theme
QWidget, QTabWidget::pane, QTabWidget::tab-bar {
background-color: #424546;
}
QTabBar::tab {
background-color: #424546;
color:white;
}
@pouyaSamie
pouyaSamie / profiles.json
Last active January 1, 2020 07:24
Windows Terminal Setting
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
"profiles":
@pouyaSamie
pouyaSamie / cloudSettings
Created November 15, 2018 05:47
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-11-15T05:44:06.638Z","extensionVersion":"v3.2.0"}
@pouyaSamie
pouyaSamie / spMonitoring.sql
Created February 4, 2018 12:18
Monitor which line of store procedure is running
SELECT SUBSTRING(detail.text,
requests.statement_start_offset / 2,
(requests.statement_end_offset - requests.statement_start_offset) / 2)
FROM sys.dm_exec_requests requests
CROSS APPLY sys.dm_exec_sql_text (requests.plan_handle) detail
WHERE requests.session_id = 82
@pouyaSamie
pouyaSamie / SpLineCount.sql
Created February 4, 2018 12:16
sql store Proc Line Number count
SELECT
DB_NAME(DB_ID()) [DB_Name],
TYPE,
name,
COUNT(*) AS Object_Count,
SUM(LinesOfCode) AS LinesOfCode
FROM (
SELECT
TYPE,
name,