Skip to content

Instantly share code, notes, and snippets.

@Xantier
Xantier / tech-insights-api.json
Last active October 28, 2021 14:21
Insomnia collection for Tech Insights API calls
{"_type":"export","__export_format":4,"__export_date":"2021-10-28T14:21:30.896Z","__export_source":"insomnia.desktop.app:v2021.6.0","resources":[{"_id":"req_0210f89440c1476a95fe35e2d067d2a8","parentId":"wrk_a1ef3d685c224a6985d5128f48fc82da","modified":1635426677423,"created":1631545015294,"url":"localhost:7000/api/tech-insights/checks/run/default/api/hello-world","name":"Check Fact","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"checks\": [\n\t\t\"simpleTestCheck\"\n\t]\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_26376288598a43dba1f22f6553c887c3"}],"authentication":{},"metaSortKey":-1631545015294,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"wrk_a1ef3d685c224a6985d5128f48fc82da","parentId":null,"modified":1631545007263,"created":1631545007263,"name":
@Xantier
Xantier / techInsights.ts
Last active October 28, 2021 14:23
Example TechInsightsBuilder initialization
/*
* Copyright 2020 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Xantier
Xantier / create-vod.sh
Created November 29, 2020 11:28
Bash script to create m3u8 TS playlist with multiple formats from an mp4 file
#!/usr/bin/env bash
export LC_NUMERIC="en_US.UTF-8"
set -e
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1
# comment/add lines here to control which renditions would be created
@Xantier
Xantier / longestIncreasingContinuousSequence
Created May 4, 2015 20:22
Two implementations on how to find longest continuously increasing subsequence from an array.
var a = [2, 5, 7, 5, 9, 66, 45, 5, 8, 1, 5, 6, 1, 2, 3, 4, 5];
var b = [1, 2, 3, 4, 5, 6, 7, 8, 9];
var c = [6, 4, 3, 2, 6, 8, 9, 11, 14, 15, 16, 12, 34, 2, 4, 5, 6, 7, 8, 9, 2, 11, 22, 22];
var d = [];
var e = [1];
function longestContIncreasingSequence(arr) {
var length = arr.length;
if (length < 2) {
return 'Length: ' + length + ', Sequence start index: ' + 0;
@Xantier
Xantier / Jussi Hallila Eslint Rules
Last active May 15, 2016 10:09
.eslintrc file with a slightly modified ruleset from Airbnb styleguide
{
"env": {
"browser": true,
"node": true,
"amd": false,
"mocha": true,
"jasmine": false,
"jquery": true
},