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
@hightemp
hightemp / add_row.sh
Created June 10, 2022 09:10 — forked from kristjan/add_row.sh
Google Spreadsheet row insertion example
# $auth from auth.sh
# $spreadsheet_id from get_spreadsheets.sh
# $worksheet_id from get_worksheets.sh
curl \
--header "Authorization: GoogleLogin auth=$auth" \
--header 'Content-Type: application/atom+xml' \
-d @data.xml \
-X POST \
"https://spreadsheets.google.com/feeds/list/$spreadsheet_id/$worksheet_id/private/full"
# Example data in data.xml
@hightemp
hightemp / armbian-espressobin-no-br0.md
Created November 19, 2021 22:09 — forked from lanefu/armbian-espressobin-no-br0.md
armbian espressobin bridgeless networking

bwaaaah eliminate hairpinning to cpu and just use wan link

This will eliminate bridge networking, and move DHCP explicity to the WAN interface (port next to usb3) on the espressobin. Approach can be applied to the lan interfaces as well

caveat: TODO: need to double check mac addresses are probaly assigned to the interfaces and not just duplicating eth0 This involves setting MACs correctly in u-boot environment

fix services

systemctl disable NetworkManager
@hightemp
hightemp / russian-banks.txt
Created October 27, 2021 20:54 — forked from felixfischer/russian-banks.txt
List of Russian Banks
"AJSIAJSIAJ BANK EVRAZIYa" (OOO)
"ALOR BANK" (OAO)
"ANKOR BANK" (OAO)
"AZIATSKO-TIKhOOKEANSKIJ BANK" (OAO)
"BANK "MBA-MOSKVA" OOO
"BANK KREMLEVSKIJ" OOO
"BANK24.RU"(OAO)
"BMV BANK" OOO
"BNP PARIBA" ZAO
"BRATSKIJ ANKB" OAO
@hightemp
hightemp / Vagrantfile
Created June 26, 2021 09:31 — forked from markuskont/Vagrantfile
Set up basic cuda/tensorflow/gpuR env with vagrant-libvirt and vfio pci-passthrough
# -*- mode: ruby -*-
# vi: set ft=ruby :
LIBVIRT_POOL = 'fast'
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu1604"
config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_udp: false
#config.vm.synced_folder "../../datastore/spindle/ML/datasets/", "/mnt", type: "nfs", nfs_udp: false
config.vm.network "private_network", :dev => "br0", :mode => 'bridge', :ip => "192.168.17.25"

RegEx

Online Regex Tester Suites & Code Generators

  • regex101 Online regex tester for PHP, PCRE, JavaScript and Python that highlights pattern and matches on the fly. Also features a code generator and a regex debugger!
  • myregextester Sports a separate regex split tester and allows to optimize patterns (I guess this is based on Perl's Regexp::Optimizer module).
  • regexr Online regex tester with good regex replace and explain functionality.
  • debuggex Shows neat expression diagrams (not active anymore).
  • regexper translates regular expressions into an SVG image (for documentation or embedding)
  • RexV2 Evaluator for PHP PCRE, PHP Posix!, Perl, Python, Javascript, Node.JS!
@hightemp
hightemp / objects_arrays.md
Created April 9, 2021 07:07 — forked from nikic/objects_arrays.md
Post explaining why objects often use less memory than arrays (in PHP)

Why objects (usually) use less memory than arrays in PHP

This is just a small post in response to [this tweet][tweet] by Julien Pauli (who by the way is the release manager for PHP 5.5). In the tweet he claims that objects use more memory than arrays in PHP. Even though it can be like that, it's not true in most cases. (Note: This only applies to PHP 5.4 or newer.)

The reason why it's easy to assume that objects are larger than arrays is because objects can be seen as an array of properties and a bit of additional information (like the class it belongs to). And as array + additional info > array it obviously follows that objects are larger. The thing is that in most cases PHP can optimize the array part of it away. So how does that work?

The key here is that objects usually have a predefined set of keys, whereas arrays don't:

@hightemp
hightemp / rutracker-magnet.user.js
Created March 7, 2021 21:20 — forked from lemenkov/rutracker-magnet.user.js
Rutracker Magnet + trackers addon for GreaseMonkey
// ==UserScript==
// @name Rutracker.org Magnet URLs
// @namespace rutrackerorg-magnet-urls
// @description Transforms torrent hash into a magnet url
// @include https://rutracker.org/*
// @include https://rutracker.cr/*
// @include https://rutracker.net/*
// @include https://rutracker.nl/*
// @include http://rutrackerripnext.onion/*
// @version 9
@hightemp
hightemp / service.js
Created February 26, 2021 07:31 — forked from paulsturgess/service.js
An example Service class wrapper for Axios
import axios from 'axios';
class Service {
constructor() {
let service = axios.create({
headers: {csrf: 'token'}
});
service.interceptors.response.use(this.handleSuccess, this.handleError);
this.service = service;
}