Skip to content

Instantly share code, notes, and snippets.

@JohnWeisz
JohnWeisz / assert.ts
Created January 29, 2017 11:06
TypeScript runtime checked type-assertion
export declare interface RuntimeAssert
{
any?: (value: any) => {
asNumber: () => number,
asArrayOfNumber: () => number[],
asString: () => string,
asArrayOfString: () => string[],
asBoolean: () => boolean,
asArrayOfBoolean: () => boolean[],
as: <T>(ctor: new (...args: any[]) => T) => T,
@walkerjeffd
walkerjeffd / Synology-Diskstation-Git.md
Last active June 30, 2024 04:48
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@strezh
strezh / GStreamer-1.0 some strings.sh
Last active October 2, 2023 09:00
GStreamer-1.0 personal cheat sheet
#!/bin/bash
# play YUV444 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \
videoconvert ! \
autovideosink
# play YUV422 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
/*
|--------------------------------------------------------------------------
| Delete form macro
|--------------------------------------------------------------------------
|
| This macro creates a form with only a submit button.
| We'll use it to generate forms that will post to a certain url with the DELETE method,
| following REST principles.
|
*/