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 / vpn-openconnect-connect-to-cisco-anyconnect.md
Created September 7, 2023 12:04 — forked from stefancocora/vpn-openconnect-connect-to-cisco-anyconnect.md
Split tunneling with openconnect - A guide on how to use openconnect to establish a vpn connection to an enterprise cisco anyconnect vpn endpoint with client side routing.

Introduction

The purpose of this short howto is to show you how to:

  • use openconnect [1] to connect to an enterprise cisco anyconnect endpoint
  • whilst minimizing the amount of traffic that your route through the vpn connection

Usually VPN administrators will puth the default route to the users, so that all user traffic is routed through the vpn connection. This is to address the various security concerns around compromised user computers bridging external internet traffic into the secure VPN network.

While the VPN administrator can push routes to the clients, the client can ignore these default routes and establish client side routing so that only the required A.B.C.D/E network is routed through the VPN. All other traffic will still use the clients default route and default outbound internet connection.

@hightemp
hightemp / http-proxy-auth.go
Created August 13, 2023 09:33 — forked from ijin82/http-proxy-auth.go
Simple HTTP proxy with authorization on golang
package main
import (
"github.com/elazarl/goproxy"
"github.com/elazarl/goproxy/ext/auth"
"log"
"net/http"
"flag"
)
@hightemp
hightemp / main.go
Created June 17, 2023 08:12 — forked from afdalwahyu/main.go
golang dynamic port forward ssh socks5 tunnel
package main
import (
"context"
"fmt"
"net"
"os"
"os/signal"
"syscall"
@hightemp
hightemp / vue-folder-structure.md
Created June 5, 2023 09:09 — forked from plinionaves/vue-folder-structure.md
Vue Project Folder Structure

Style Guide

This file describes de required Style Guide used by Basicamente to keep the Best Practices on develop new features or improve/change existents one.

Project folder structure

Always follow the folder structure below:

src/
@hightemp
hightemp / auth_create.php
Last active May 17, 2023 12:18
laminas create auth2 with user
<?php
namespace ReferenceBooks\Controller;
use ApiSkeletons\OAuth2\Doctrine\Entity\AccessToken;
use ApiSkeletons\OAuth2\Doctrine\Entity\Client;
use Doctrine\ORM\EntityManager;
use Laminas\Mvc\Controller\AbstractActionController;
use Laminas\View\Model\JsonModel;
use Users\Entity\Acl\Role;
@hightemp
hightemp / docker-compose.yml
Created January 21, 2023 05:38 — forked from ronaldsuwandi/docker-compose.yml
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:
@hightemp
hightemp / zipapp.md
Created December 22, 2022 21:54 — forked from lukassup/zipapp.md
Python zipapp

Python zipapp web apps

What's a zipapp?

This concept is very much like .jar or .war archives in Java.

NOTE: The built .pyz zipapp can run on both Python 2 & 3 but you can only build .pyz zipapps with Python 3.5 or later.

Initial setup

@hightemp
hightemp / auto_audio_level.sh
Created November 23, 2022 15:34
autobalancing sound level with pactl
#!/bin/bash
CNT=0
CNT2=0
while :; do
LVL=$(arecord -f S16_LE -qd 1 /tmp/rec.waw && sox /tmp/rec.waw -n stat 2>&1 | awk 'BEGIN{FS=":"} NR==4 {print $2}')
CLVL=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{ print $5 }' | egrep -o [0-9]+)
echo $CLVL", "$LVL", "$CNT
@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