Skip to content

Instantly share code, notes, and snippets.

View Bnaya's full-sized avatar
🐪

Bnaya Peretz Bnaya

🐪
View GitHub Profile
@Bnaya
Bnaya / main.js
Created November 29, 2024 08:03
Inject download links to cloud.panopto.eu list page
// Be in a content list page
// Paste and run this code in the dev tools console
await main();
async function main() {
const linksToViewerPage = [
...document.querySelectorAll("#listViewContainer a.detail-title"),
];
let step = linksToViewerPage.map((aElement) => {
@Bnaya
Bnaya / index.ts
Last active July 16, 2022 11:55
Typescript Types indirect re-export with isolatedModules: true
// Cannot re-export a type when the '--isolatedModules' flag is provided.ts(1205)
export { IMyInterface } from "./types"
// this works!
import { IMyInterface as IMyInterfaceForExport } from "./types"
export type IMyInterface = IMyInterfaceForExport;
// And Also:
export type IMyInterface2 = import("./types").IMyInterface;
@Bnaya
Bnaya / dep.ts
Last active April 28, 2022 16:23
ts-node + esm
export function funci() {
return "AHH HHHHAAA";
}
@Bnaya
Bnaya / fetch-stream-json-parser.ts
Created April 9, 2019 08:24
fetch-stream-json-parser.ts basic code example
// https://github.com/dominictarr/JSONStream
// @ts-ignore
import JSONStream from "JSONStream";
import { Observable } from "rxjs";
class Bla {
public creativesOfChannelV4StreamEndpoint<T=any>(
channel: T,
brandId: string,
@Bnaya
Bnaya / .gitignore
Last active December 13, 2020 11:28
Lambda + api gateway + CF = serve zip
# package directories
node_modules
jspm_packages
# Serverless directories
.serverless

Re-export class + intermediate variable = "using private name" error

run yarn tsc4p1 = "using private name" error

run yarn tsc4p0 = "using private name" error

commonjs re-export of js + deceleration emit = crash!

run yarn tsc4p1 = Crash!!

run yarn tsc4p0 = "private name error is expected"

@Bnaya
Bnaya / myentities.ts
Last active September 28, 2020 03:24
typeorm-idonnowhattodo-1
import {
Entity,
JoinColumn,
ManyToOne,
Column,
PrimaryGeneratedColumn,
ManyToMany,
JoinTable,
OneToMany,
CreateDateColumn,

Examples for mobx-state-tree + TypeScript article

@Bnaya
Bnaya / README.md
Created July 20, 2020 08:36
Basic example of fetch api + expressjs/multer using files and text fields

Basic example of fetch api + expressjs/multer using files and text fields