This file contains hidden or 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
const vscode = require('vscode'); | |
const TelemetryReporter = require('vscode-extension-telemetry'); | |
// events are in format username/extensionId/action | |
const extensionId = '<your extension unique name>'; | |
const extension = extensions.getExtension(extensionId)!; | |
const extensionVersion = extension.packageJSON.version | |
// the application insights key |
This file contains hidden or 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
import { spawn, ChildProcess } from "child_process" | |
child = spawn("command", ["argument"]) | |
child.kill() |
This file contains hidden or 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
import {exec} from 'child_process' | |
/** | |
* kills the process and all its children | |
* If you are on linux process needs to be launched in detached state | |
* @param pid process identifier | |
* @param signal kill signal | |
*/ | |
export function killAll(pid:number, signal:string|number='SIGTERM'){ | |
if(process.platform == "win32"){ |
This file contains hidden or 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
/** | |
* class for limiting the rate of function calls. | |
* Thanks to Pat Migliaccio. | |
* see https://medium.com/@pat_migliaccio/rate-limiting-throttling-consecutive-function-calls-with-queues-4c9de7106acc | |
* @example let l = new limit(); let logMessageLimited = l.throttleAndQueue(msg => { console.log(msg); }, 500); | |
*/ | |
class limit{ | |
public callQueue = [] | |
/** |
This file contains hidden or 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
import requests | |
from parsel import Selector | |
# $("div.dd-image-box-caption").toArray().forEach((div)=>{console.log(div.textContent.trim())}); | |
data = """Sam & Max: Season 1 | |
Sam & Max: Season 2 | |
Puzzle Agent 1 | |
Puzzle Agent 2 | |
Bone - Episode 1 & Episode 2 |
NewerOlder