This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function x | |
nohup fish -c "$argv &" > /dev/null && exit | |
end | |
function x_complete | |
set arg (commandline -ct) | |
complete -C$arg | |
end | |
complete --command x --arguments '(x_complete)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# taken from github.com/dandavison/nushell-config | |
export def 'set difference' [s2: list] { | |
# nushell doesn't have a hash table so quadratic time complexity | |
let s1 = ($in | sort | uniq) | |
let s2 = ($s2 | sort | uniq) | |
$s1 | where {|x| not ($x in $s2)} | |
} | |
export def 'set intersection' [s2: list] { |
wheatpaste / comlink / compost
posters:
- Window::{postMessage, on:message, on:messageerror, on:error}
- Worker::{postMessage, on:message, on:messageerror, on:error, terminate}
- BroadcastChannel::{postMessage, on:message, on:messageerror, close}
- SharedWorker::{port}
- MessageEvent::{ports}
- MessagePort::{postMessage, on:message, on:messageerror}
- DedicatedWorkerGlobalScope::{postMessage, on:message, on:messageerror}
- Determine the maximum current
$I_{max}$ of the wires supporting your grid. - Determine the maximum voltage drop
$V_{drop}$ between two devices on your grid. - Choose the level difference
$V_{diff} > 2 V_{drop}$ and the top voltage$V_{top}$ .- If you're intending to upgrade your grid to allow for higher transmitted power in the future, increasing
$V_{top}$ is the easiest way to do it. Therefore it is recommended to choose a reasonable ceiling$V_{max} > V_{top}$ and select all the equipment so that it supports voltages up to$V_{max}$ .
- If you're intending to upgrade your grid to allow for higher transmitted power in the future, increasing
- Count the priority levels of sources and sinks that you want to use. A typical setup would be:
- (sink) Dummy load; (source) Energy harvesting
- (sink) Low efficiency energy storage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"segments": [ | |
{ | |
"foreground": "red", | |
"style": "plain", | |
"template": "<i><d>n</d></i> ", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function* asyncCombine<S, T>( | |
a: AsyncIterable<S>, | |
b: AsyncIterable<T>, | |
): AsyncIterable<[S | undefined, T | undefined]> { | |
let aVal: S | undefined; | |
let bVal: T | undefined; | |
let aDone = false; | |
let bDone = false; | |
const aIter = a[Symbol.asyncIterator](); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:if(location.hostname=='prehrajto.cz'||location.hostname=='prehraj.to'){var a=document.createElement('a');if(confirm('OK = Stáhnout\nZrušit = Sledovat nyní')){a.setAttribute('download',document.querySelector('.video-detail-title').textContent+'.mp4');};a.setAttribute('href',(a0=document.querySelector('.jw-video'))?a0.getAttribute(%27src%27):document.querySelector(%27.video-wrap meta[itemprop="contentUrl"]%27).getAttribute(%27content%27));a.textContent=%27download%27;document.body.appendChild(a);a.click();}else if(confirm(%27Přesměrovat na Přehraj.to?%27)){window.location = %27http://prehrajto.cz%27;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type nullish = undefined | null; | |
export type AnyConstructor = new (...x: any) => any; | |
export function isA(x: unknown, type: "string"): x is string; | |
export function isA(x: unknown, type: "number"): x is number; | |
export function isA(x: unknown, type: "bigint"): x is bigint; | |
export function isA(x: unknown, type: "boolean"): x is boolean; | |
export function isA(x: unknown, type: "symbol"): x is symbol; | |
export function isA(x: unknown, type: "undefined"): x is undefined; | |
export function isA(x: unknown, type: "object"): x is object | null; |