| var axios = require("axios"); | |
| var axiosDefaults = require("axios/lib/defaults"); | |
| axiosDefaults.xsrfCookieName = "csrftoken" | |
| axiosDefaults.xsrfHeaderName = "X-CSRFToken" |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
- Create a bare clone of the repository.
(This is temporary and will be removed so just do it wherever.)
git clone --bare [email protected]:usi-systems/easytrace.git
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.
| import logging | |
| import sys | |
| from logging.handlers import TimedRotatingFileHandler | |
| FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") | |
| LOG_FILE = "my_app.log" | |
| def get_console_handler(): | |
| console_handler = logging.StreamHandler(sys.stdout) | |
| console_handler.setFormatter(FORMATTER) |
| # import libraries | |
| from selenium import webdriver | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.support.select import Select | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.support import expected_conditions as EC | |
| import pandas as pd | |
| import datetime | |
| # prepare the driver |
| """ | |
| This is an adaptable example script for using selenium across multiple webbrowsers simultaneously. This makes use of | |
| two queues - one to store idle webworkers and another to store data to pass to any idle webworkers in a selenium function | |
| """ | |
| from multiprocessing import Queue, cpu_count | |
| from threading import Thread | |
| from selenium import webdriver | |
| from time import sleep | |
| from numpy.random import randint |
Ventura docs for M2 Macs in this comment: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd?permalink_comment_id=4555340#gistcomment-4555340
Old Monterey docs in this old revision: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd/32c410e3a1de73539c76fa13ea5486569c4e0c5d
Solution for Sonoma: https://gist.github.com/sghiassy/a3927405cf4ffe81242f4ecb01c382ac
#protonmail #debian #linux
Currently protonmail bridge for linux is distributed as part of an open beta program, but soon it will be made public (https://protonmail.com/bridge/install).
Consider that the bridge linux client requires a paid protonmail account to work.
| // try it : https://codesandbox.io/s/sample-next-ts-rhf-zod-9ieev | |
| import React from "react"; | |
| import { useForm } from "react-hook-form"; | |
| import { zodResolver } from "@hookform/resolvers/zod"; | |
| import { z } from "zod"; | |
| import type { FieldError } from "react-hook-form"; | |
| // JSON.stringify(error) will not work, because of circulare structure. So we need this helper. |

