Skip to content

Instantly share code, notes, and snippets.

View avin's full-sized avatar
🚀

Avin Lambrero avin

🚀
View GitHub Profile
@avin
avin / instruction.md
Created May 7, 2024 17:56
Raspberry Pi OpenWRT WireGuard router (+keep vanilla internet on the device)
echo "201 vpn" >> /etc/iproute2/rt_tables

Edit /etc/config/network

config interface 'loopback'
        option device 'lo'
@avin
avin / setup.md
Last active May 6, 2024 17:34
Wireguard via Docker

Prepare

sudo mkdir -p /opt/wireguard/config
sudo nano /opt/wireguard/docker-compose.yml

docker-compose.yml content:

---
services:
@avin
avin / setup.md
Created March 30, 2024 10:03
Setup OpenWRT router with wireguard client

Preconfigure two interfaces wan and lan (if not already configured)

vi /etc/config/network

config interface 'wan'
        option device 'eth0'
        option proto 'dhcp'

config interface 'lan'
@avin
avin / vmwk17key.txt
Created February 10, 2024 14:31 — forked from PurpleVibe32/vmwk17key.txt
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@avin
avin / App.tsx
Last active September 14, 2023 19:35
Slim form control
import React, {memo, useCallback, useEffect, useRef} from 'react';
import {useControl, useForm, useValidation} from './utils/useFormState';
// function useTraceUpdate(props: any) {
// const prev = useRef(props);
// useEffect(() => {
// const changedProps = Object.entries(props).reduce((ps: any, [k, v]) => {
// if (prev.current[k] !== v) {
// ps[k] = [prev.current[k], v];
// }
@avin
avin / template.ftl
Created May 19, 2023 07:50
Freemarker dump all data
<#-- JSON stringify -->
<#function stringify obj>
<#if !obj??>
<#return 'undefined'>
</#if>
<#if obj?is_date>
<#return '"' + obj?string("yyyy-MM-dd HH:mm:ss") + '"'>
</#if>
<#if obj?is_boolean || obj?is_number>
<#return obj?string>
@avin
avin / obs-auto-record.cmd
Created April 6, 2023 13:04
Periodical record in OBS
:: This script automates video recording using OBS
:: Disable command echoing and clear the screen
echo off
cls
:: Set the log file path
set logfile="C:\utils\autorecord\logs\automate.log"
echo log file will be %logfile%
// ==UserScript==
// @name SuperAjax for AppLinks
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Allow to do cross-domain AJAX requests
// @author You
// @run-at document-start
// @connect *
// @match https://localhost:5173/*
// @match https://web.rbsdev.com/front-utils/app-links/*
@avin
avin / needful-languages.js
Last active March 4, 2023 12:14
[TAMPERMONKEY] Only needful languages for AIPRM for ChatGPT
// ==UserScript==
// @name Only needful languages for AIPRM for ChatGPT
// @namespace http://tampermonkey.net/
// @version 0.1
// @author You
// @description try to take over the world!
// @match https://chat.openai.com/chat
// @icon https://www.google.com/s2/favicons?sz=64&domain=openai.com
// @grant none
// ==/UserScript==
@avin
avin / react-to-vue.md
Last active April 23, 2024 03:41
Migrate from React to Vue | Migrate from Vue to React