Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
Discovering

Amin aminkhoshzahmat

:shipit:
Discovering
View GitHub Profile
@aminkhoshzahmat
aminkhoshzahmat / CountryType
Last active Aug 16, 2022
Country names, codes, phones
View CountryType
<?php
namespace App\Entity\Enums;
define("CODE", 'code');
define("PHONE", 'phone');
define("NAME", 'name');
enum CountryType
{
View hack-tools.txt
Google dorks
1) find useful files > site: tesla.com filetype:pdf
2) find emails > "@tesla.com" -site:tesla.com
> "@etf.bg.ac.rs" -site:etf.bg.ac.rs
> intitle:admin OR inurl:admin site:etf.bg.ac.rs
3) Search "googl dorks" > exploit.com
Find IP
Ping, Host, nslookup (active)
View typescript-builder-pattern.ts
// Builders
class SimpleBuilder {
constructor(private current = {}) {
}
prop(key: string, value: any) {
return new SimpleBuilder({ ...this.current, ...{ [key]: value } });
}
@aminkhoshzahmat
aminkhoshzahmat / config
Created Nov 8, 2021 — forked from pksunkara/config
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
View config
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
[sendemail]
smtpencryption = tls
View gist:b53b0ab12e017bef1a64bc73dd397786
version: '3'
services:
drupal:
image: drupal
ports:
- "80:80"
volumes:
- drupal-modules:/var/www/html/modules
- drupal-profiles:/var/www/html/profiles
View cast_collation.sql
UPDATE company
SET name=convert(cast(convert(name using latin1) as binary) using utf8mb4),
contact_role=convert(cast(convert(contact_role using latin1) as binary) using utf8mb4),
address=convert(cast(convert(address using latin1) as binary) using utf8mb4),
city=convert(cast(convert(city using latin1) as binary) using utf8mb4),
phone=convert(cast(convert(phone using latin1) as binary) using utf8mb4),
postal_code=convert(cast(convert(postal_code using latin1) as binary) using utf8mb4),
website=convert(cast(convert(website using latin1) as binary) using utf8mb4),
code=convert(cast(convert(code using latin1) as binary) using utf8mb4);
@aminkhoshzahmat
aminkhoshzahmat / 2nginx_with_haproxy.yml
Created Jan 29, 2021
Ansible: Install 2 nginx server and load balance with haproxy
View 2nginx_with_haproxy.yml
- name: ----- Add haproxy to host -----
lineinfile:
path: /etc/hosts
insertafter: EOF
line: '192.168.56.66 haproxy'
tags: haproxt
- name: ----- Install epel-release and enginx -----
yum:
@aminkhoshzahmat
aminkhoshzahmat / Makefile
Last active Jan 14, 2021
Makefile sample file
View Makefile
# =================================
# Variables #
# =================================
CG=\033[0;36m#..........green color
CP=\033[0;35m#...........pink color
CF=\033[0;33m#...........pink color
NC=\033[0m#................no color
SPRINT=1.0.0#...............Version
COMMANDS=${CP}Commands${NC}
DATE=`date +%Y-%m-%d-%H.%M.%S`
@aminkhoshzahmat
aminkhoshzahmat / tasks.yml
Last active Jan 8, 2022
Ansible examples with modules
View tasks.yml
- name: ----- Create dir1 in /home -----
file:
path: /home/dir1
state: directory
owner: root
group: root
mode: 0755
tags: [create_dir1]
- name: ----- create dir2 in /home ------