// Updated: Aug. 20, 2024 | |
// Run: node testRegex.js whatever.txt | |
// Live demo: https://jina.ai/tokenizer | |
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0) | |
// COPYRIGHT: Jina AI | |
const fs = require('fs'); | |
const util = require('util'); | |
// Define variables for magic numbers | |
const MAX_HEADING_LENGTH = 7; |
<?php | |
/* | |
A simple PHP class to perform basic operations against Amazon S3 and compatible | |
services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules. | |
Copyright 2022 Marco Arment. Released under the MIT license: | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
- I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
- I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
- Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.
- On WG server, I started an
iperf3
server - On WG peer, I wrote a script that does the following:
wg-quick down wg0
- Edit MTU in the
/etc/wireguard/wg0.conf
file
Find the proper driver at the NVidia website.
Note: Make sure to select "Linux 64-bit" as your OS
Hit the "Search" button.
class AddVirtualColumnIndexToAhoyEvents < ActiveRecord::Migration[6.0] | |
def up | |
ActiveRecord::Base.connection.execute ( | |
'ALTER TABLE ahoy_events ADD properties_id INT AS (JSON_UNQUOTE(properties->"$.id")) STORED;' | |
) | |
ActiveRecord::Base.connection.execute ( | |
'ALTER TABLE ahoy_events ADD INDEX (properties_id);' | |
) | |
end | |
def down |
Note
If you want to use pure WSLg, you can try the new WSLg (XWayland) tutorial or the WSLg (Wayland) tutorial.
In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).
The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc) and tigervnc-standalone-server
.
For this setup, I will use Ubuntu (20.04, 22.04 and 24.04 are working), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample
require 'axlsx' | |
class SpreadsheetJob < ApplicationJob | |
queue_as :reports | |
def perform(*args) | |
@timestamp = args[0]['timestamp'] | |
create_report | |
create_spreadsheet |
# Sample command: | |
# rsync_on_flaky_networks.sh 192.168.101.102:logs_20200706* dst_folder/ | |
SRC="$1" | |
DST="$2" | |
if [ "$SRC" == "" ]; then | |
echo "Invalid arguments. Usage: $0 <SRC> <DST>" | |
fi | |
if [ "$DST" == "" ]; then | |
echo "Invalid arguments. Usage: $0 <SRC> <DST>" |
const hoverTime = 400 | |
const fetchers = {} | |
const doc = document.implementation.createHTMLDocument('prefetch') | |
function fetchPage (url, success) { | |
const xhr = new XMLHttpRequest() | |
xhr.open('GET', url) | |
xhr.setRequestHeader('VND.PREFETCH', 'true') | |
xhr.setRequestHeader('Accept', 'text/html') | |
xhr.onreadystatechange = () => { |