Skip to content

Instantly share code, notes, and snippets.

View dmitry-udod's full-sized avatar

Dima Udod dmitry-udod

View GitHub Profile
@dmitry-udod
dmitry-udod / gist:e59bb0022e8acea4f7fc91a90cb02fb5
Last active March 11, 2025 06:20
Proxmox & Ubuntu VM - resize disk
sudo growpart /dev/vda 3
sudo pvdisplay
sudo pvresize /dev/
sudo lvdisplay
sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
sudo resize2fs /dev/ubuntu-vg/ubuntu-lv
#Sample Nmap http-enum Script Output
nmap -sV --script=http-enum -p 80 192.168.88.251
# Services discovery
nmap -sV -O 192.168.88.251
#Running the Nmap NSE Default Scripts
nmap -sC 192.168.88.251
#Enumerating SMB Shares
@dmitry-udod
dmitry-udod / ttl.php
Last active February 13, 2023 08:13
Cache TTL with time jitter
$ttl = (int) (3600 + (mt_rand() / mt_getrandmax() * (60 * 2))); /* +/- 2 minutes */
@dmitry-udod
dmitry-udod / .travis.yml
Created July 13, 2018 13:50
TravisCI for Laravel 5.6 (PostgreSQL, PHPUnit)
os:
- linux
language: php
php:
- '7.1'
services:
- postgresql
I, you, we, they + do
He, she, it + does
I, you, we, they + do not / don’t + do
He, she, it + does not / doesn’t + do
Do + I, you, we, they + do?
Does + he, she, it + do?
-ss, -ch, -sh, -x в конце глагола + -es: fix – fixes
согласный + -y в конце глагола + -es: study – studies
гласный + -y в конце глагола + -s: play – plays
@dmitry-udod
dmitry-udod / laravel_bik_validation.php
Last active July 8, 2024 12:01
Валидация банковских данных. соответствие БИК и расчетного счета (корреспондентского) банка (Laravel). Bank data validation bik and accounts
<?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
class CheckBankAccount implements Rule
{
public $bikForTest = '';
select DISTINCT ON (t.orders) * from (select max(id) id, max(email), max(orders) as orders, campaign_id from coupons group by campaign_id ORDER BY orders DESC) as t ORDER BY t.orders DESC
@dmitry-udod
dmitry-udod / gist:25ffec34abbdbd8648835c4f44832a4f
Created August 30, 2016 13:10
Golang convert int or string to int
package main
import (
"encoding/json"
"fmt"
"log"
)
type Object struct {
Num json.Number
@dmitry-udod
dmitry-udod / .zshrc
Last active August 29, 2015 14:23 — forked from andboson/.zshrc
export GOPATH=`pwd`
export PATH="$PATH:$GOPATH/bin"
echo -e "\033[0;32m CURRENT GOPATH IS: $GOPATH \e[0m"
alias rp='source ~/.zshrc'