vi /etc/config/network
config interface 'wan'
option device 'eth0'
option proto 'dhcp'
config interface 'lan'
| 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]; | |
| // } |
| <#-- 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> |
| :: 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/* |
| // ==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== |
React:
Vue:
React:
| // ==UserScript== | |
| // @name Coursehunter Separate Video Player | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description try to take over the world! | |
| // @author You | |
| // @match https://coursehunter.net/* | |
| // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
| // @grant none | |
| // ==/UserScript== |
If tag with target="_blank" or uses window.open the hacker can replace original tab with opener.location="https://www.evilsite.com"; by opened page.
It can be used in a phishing attack
To fix it add rel="noopener" to and 'noopener' as third argument for window.open(:
window.open('https://www.your.url','_blank','noopener')
Add header Strict-Transport-Security: max-age=31536000; includeSubdomains; preload to make sure that the user once accessed
the HTTPS version of the page will always be automatically redirected to it bypassing requests for HTTP.
| Original text from: https://seanprashad.com/leetcode-patterns/ | |
| ---- | |
| If input array is sorted then | |
| - Binary search | |
| - Two pointers | |
| If asked for all permutations/subsets then | |
| - Backtracking |