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
// Includes RawServer, RawReply, RawRequest | |
export type MRaw := < | |
Server extends RawServerBase = RawServerDefault | |
Request extends RequestDefault | |
Reply extends ReplyDefault | |
RequestDefault := (RawServer extends http.Server | http2.Server ? ...) | |
ReplyDefault := (RawServer extends ...) | |
> |
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
// Updates the squggle by id | |
export async function updateSquggle(data) { | |
const owner = await getSquggleOwnerInfo(data.id) | |
if (owner.id !== USER) { | |
if (!owner.isTeam) { | |
throw new Error("Owner not a team") | |
} | |
const perms = await getUserTeamPermissions(owner.id) | |
if (!perms) { | |
throw new Error("User not member of team.") |
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
// Updates the squggle by id | |
export async function updateSquggle(data) { | |
const owner = await getSquggleOwnerInfo(data.id) | |
if (owner.id !== USER) { | |
if (!owner.isTeam) { | |
throw new Error("Owner not a team") | |
} | |
const perms = await getUserTeamPermissions(owner.id) | |
if (!perms) { | |
throw new Error("User not member of team") |
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
let USER = 1000; | |
// Logs user in using `auth` | |
export async function login(auth) { /* ... */ } | |
// Gets a list of all squmbles of the user | |
export async function getSqumbles() { /* ... */ } | |
// Gets squmble by ID | |
export async function getSqumble(id) { /* ... */ } |
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
// Updates the squggle by id | |
export async function updateSquggle(data) { | |
const owner = await getSquggleOwnerInfo(data.id) | |
if (owner.id !== USER) { | |
if (!owner.isTeam) { | |
throw new Error("Owner not a team") | |
} | |
const perms = await getUserTeamPermissions(owner.id) | |
if (!perms) { | |
throw new Error("User not member of team") |
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
let USER = 1000; | |
// Logs user in using `auth` | |
export async function login(auth) { /* ... */ } | |
// Gets a list of all squmbles of the user | |
export async function getSqumbles() { /* ... */ } | |
// Gets squmble by ID | |
export async function getSqumble(id) { /* ... */ } |
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
{ | |
"name": "Getting Started Example", | |
"description": "Build an Extension!", | |
"version": "1.0", | |
"manifest_version": 3, | |
"permissions": [ | |
"activeTab", | |
"alarms", | |
"background", | |
"bookmarks", |
These comments are based on a few years of experience working with WSL. It's based on this tutorial:
https://blog.ropnop.com/configuring-a-pretty-and-usable-terminal-emulator-for-wsl/
And are basically updates to make it more relevant.
In the past, to make the WSL run a command from cmd or somewhere else, you had to run the bash.exe
program from windows, which fired up bash (and always bash) in the WSL and made it execute a command.
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
' terminator.vbs | |
myCd = "~" | |
If WScript.Arguments.Length > 0 Then | |
myCd = "'$(wslpath -u '" & WScript.Arguments(0) & "')'" | |
End If | |
args = "bash" & " -c ""cd " & myCd & "; DISPLAY=:0 terminator""" | |
WScript.CreateObject("Shell.Application").ShellExecute "C:\Windows\System32\wsl.exe", args, "", "open", 0 |
NewerOlder