Skip to content

Instantly share code, notes, and snippets.

View hightemp's full-sized avatar
🎯
Focusing

Anton Panov hightemp

🎯
Focusing
View GitHub Profile
@hightemp
hightemp / scan_profile.usp
Created August 2, 2022 18:38 — forked from CanadianJeff/scan_profile.usp
Zenmap Scan Profile
[All TCP ports scan]
command = nmap -sS -p 1-65535 -Pn
description = Scan all ports on a host.
[Common TCP connect scan]
command = nmap -sT -p 17,19,21,22,23,25,26,37,53,80,88,110,113,123,135,137,138,139,143,443,444,445,548,554,843,993,995,1027,1030,1064,1080,1194,1221,1433,2082,2083,2084,2086,2087,2095,2096,3074,3306,3333,3389,3784,4899,5631,5800,5900,6665-6669,6697,8000,8080,8088,10000,17500,32764 -n -Pn -r
description = Scan Common Used Ports
[Common TCP syn scan]
command = nmap -sS -p 17,19,21,22,23,25,26,37,53,80,88,110,113,123,135,137,138,139,143,443,444,445,548,554,843,993,995,1027,1030,1064,1080,1194,1221,1433,2082,2083,2084,2086,2087,2095,2096,3074,3306,3333,3389,3784,4899,5631,5800,5900,6665-6669,6697,8000,8080,8088,10000,17500,32764 -n -Pn -r
@ronaldsuwandi
ronaldsuwandi / docker-compose.yml
Created December 22, 2020 05:17
Docker Compose for Jupyter Lab/Notebook (no token/password)
version: "3.9"
services:
jupyter:
image: jupyter/scipy-notebook
ports:
- "8888:8888"
volumes:
- ./notebooks:/home/jovyan/
environment:
@afdalwahyu
afdalwahyu / main.go
Last active July 20, 2023 09:31
golang dynamic port forward ssh socks5 tunnel
package main
import (
"context"
"fmt"
"net"
"os"
"os/signal"
"syscall"
@hightemp
hightemp / snippets.md
Last active October 22, 2023 12:10
Bash snippets

Bash snippets

Get size of files of current directory with mask

du -c `find . -maxdepth 1 -name '*.php'` | tail -1

Count lines in files with mask

find . -maxdepth 1 -name '*.php' -print | xargs wc -l
@hightemp
hightemp / snippets.md
Last active May 9, 2019 20:06
Git snippets

Git snippets

Merge unrelated histories repositories

git pull origin master --allow-unrelated-histories

Copy commit from one branch to another

git cherry-pick -x 
@justincormack
justincormack / notes
Created September 5, 2018 14:41
criu setup Ubuntu 18.04
apt update
apt upgrade
apt install build-essential
apt install pkg-config
apt install libnet-dev python-yaml libaio-dev
apt install libprotobuf-dev libprotobuf-c0-dev protobuf-c-compiler protobuf-compiler python-protobuf libnl-3-dev libcap-dev python-future
# criu install
curl -O -sSL http://download.openvz.org/criu/criu-3.10.tar.bz2
tar xjf criu-3.10.tar.bz2
@hightemp
hightemp / snippets.md
Last active September 29, 2018 12:32
Vue snippets

Vue snippets

Watch vuex state changes

computed: {
  doneTodosCount () {
    return this.$store.getters.doneTodosCount
  }
}

watch:{
@hightemp
hightemp / snippets.md
Last active September 29, 2018 12:32
JS Snippets
@hightemp
hightemp / snippets.md
Last active October 6, 2018 14:34
Laravel snippets

Laravel snippets

Define PDO object in DB Laravel

DB::connection()->setPdo($pdo);

Get PDO object from DB Laravel

$pdo = DB::connection()->getPdo();
@hightemp
hightemp / cscart.md
Last active September 29, 2018 12:31
CS Cart snippets

CS Cart snippets

Руководство по кодировке UTF-8 в PHP и MySQL

Файловые функции и UTF-8

В Unix и Linux (и, возможно, в OS X тоже) текущая Кодировка файловой системы задается параметром локали LC_CTYPE (см. функцию setlocale() http://php.net/manual/ru/function.setlocale.php). Например, он может иметь значение типа en_US.UTF-8, что означает кодировку UTF-8. Затем имена файлов и их пути могут быть созданы с помощью fopen() или получены с помощью dir() с этой кодировкой.

Кодировка PHP UTF-8 в php.ini-файле