Skip to content

Instantly share code, notes, and snippets.

View tanepiper's full-sized avatar

Tane Piper tanepiper

View GitHub Profile
@tanepiper
tanepiper / settings.jsonc
Created May 15, 2023 09:29 — forked from hyperupcall/settings.jsonc
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
{
"description": {
"id": "chatcmpl-76frmTglXoRedUn6AlwGv0ddHSWtL",
"object": "chat.completion",
"created": 1681825258,
"model": "gpt-4-0314",
"usage": {
"prompt_tokens": 3915,
"completion_tokens": 281,
"total_tokens": 4196
@tanepiper
tanepiper / And it came to pass...txt
Created December 3, 2022 16:10
God hates Space users
And it came to pass that the lord of the programming realm spoke unto his people, saying 'thou shalt choose between the
tab and the space, for they are the instruments of order and chaos. And he who chooses the tab shall be righteous in the
eyes of the lord, for the tab shall bring forth clean and organized code. But he who chooses the space shall be wicked and
lawless, for the space shall bring forth convoluted and disordered code. And so the holy war between the tab and the space
began, with the faithful servants of the lord fighting for the way of the tab, and the wicked followers of the space
seeking to overthrow the order of the lord.'
@tanepiper
tanepiper / bookmarklet.js
Last active November 21, 2022 16:28 — forked from bramus/bookmarklet.md
Mastodon User Page Bookmarklet
javascript:(function(){
const MY_MASTO_HOST = 'tane.codes';
if (window.location.host === MY_MASTO_HOST) return;
const user = document.querySelector('meta[property="profile:username"]')?.getAttribute('content');
if (!user) return;
window.location.href = `https://${MY_MASTO_HOST}/@${user}`;
})();
@tanepiper
tanepiper / breadcrumb.integration.spec.ts
Last active February 11, 2021 21:20 — forked from LayZeeDK/breadcrumb.integration.spec.ts
Tane Piper: Auxiliary route test
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { Component, Injectable, Input, OnDestroy } from '@angular/core';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { ActivatedRouteSnapshot, NavigationEnd, Route, Router } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { Subject } from 'rxjs';
import { filter, map, takeUntil, tap } from 'rxjs/operators';
interface Breadcrumb {
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { BreadcrumbComponent } from './breadcrumb.component';
import { RouterTestingModule } from '@angular/router/testing';
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { By } from '@angular/platform-browser';
import { HttpClientTestingModule } from '@angular/common/http/testing';
describe('BreadcrumbComponent', () => {
<!DOCTYPE html>
<html>
<head></head>
<body>
<button class="start">Start Serial Request</button>
<button class="send">Send Signal</button>
</body>
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.min.js"></script>
#!/usr/bin/env python
"""
Video Transcoder Daemon
@author Tane Piper
The Transcoder Daemon is an application that runs as a background process
on a unix server. Using web.py, it acts as a web application listening on
a set port. It takes incoming /queue requests which contain POST information.
The simple queue, just takes in a filename for input and output and some
quality information.
<!DOCTYPE html>
<html>
<head>
<title>UMD RxJS Ninja</title>
</head>
<body></body>
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.min.js"></script>
<script>
export class ReplayControlValueChanges<T> extends Observable<T> {
constructor(control: AbstractControl | AbstractControlDirective) {
super(subscriber => {
if (!control.valueChanges) {
throw new Error('Control does not have valueChanges');
}
control.valueChanges.pipe(startWith(control.value)).subscribe(subscriber);
});
}