Skip to content

Instantly share code, notes, and snippets.

View netsi1964's full-sized avatar

Sten Hougaard netsi1964

View GitHub Profile
@netsi1964
netsi1964 / doneTasks.js
Last active February 10, 2021 13:40
Get done tasks from Jira
var columns = Array.from(document.querySelectorAll('.ghx-column-title')).map(
(title) => `${title.textContent}\n${'*'.repeat(title.textContent.length + 5)}`
);
document.querySelectorAll('.ghx-columns').forEach((col) => {
const cols = col.querySelectorAll('.ghx-column');
cols.forEach((col, i) => {
col.querySelectorAll('.ghx-issue-fields').forEach((ele) => {
const mev = ele.querySelector('.ghx-key').textContent;
const txt = ele.querySelector('.ghx-inner').textContent;
columns[i] += `\n${mev}: ${txt}`;
@netsi1964
netsi1964 / mousse.ts
Last active January 18, 2021 15:49
A deno script listning on port 8080 allowing to hit it with rest path: /:route/:id/:action
// deno run --allow-net mousse.ts
import { Mousse } from 'https://github.com/Tyrenn/mousse/raw/main/mod.ts';
let mousse = new Mousse({ port: 8080 });
async function handleRequest(c: any) {
const _body = {
...c.params,
};
const body = JSON.stringify(_body);
@netsi1964
netsi1964 / caniuse.ts
Last active December 12, 2020 10:11
Deno script which creates a HTML table (or text) showing browser feature implementations state
/*
Get Browser feature implementation state
- fetches data from caniuse.com
- checks each browser for support of known features
- generates a HTML table as seen here: https://codepen.io/netsi1964/pen/PoGWoWP
RUN: deno run --allow-net caniuse.ts
Created by Sten Hougaard @netsi1964 12/12-2020
*/
interface SupportStatus {
supported: number;
This file has been truncated, but you can view the full file.
{
"eras": {
"e-83": "83 versions back",
"e-82": "82 versions back",
"e-81": "81 versions back",
"e-80": "80 versions back",
"e-79": "79 versions back",
"e-78": "78 versions back",
"e-77": "77 versions back",
"e-76": "76 versions back",
@netsi1964
netsi1964 / byCode.js
Last active December 3, 2020 18:16
Get phone country codes from iban.com
const byCode = {
"1": {
"country": "United States Virgin Islands",
"code": "1",
"intPrefix": "011",
"natPrefix": "1",
"natNumber": "(340)+7 digits",
"utsDst": "-4",
"note": " "
},
/**
* webserver.ts
*/
import { serve } from "https://deno.land/std@0.74.0/http/server.ts";
const server = serve({ hostname: "0.0.0.0", port: 8080 });
console.log(`HTTP webserver running. Access it at: http://localhost:8080/`);
for await (const request of server) {
let bodyContent = "Your user-agent is:\n\n";
@netsi1964
netsi1964 / fingerprint.svg
Last active September 6, 2020 13:40
A pseudo fingerprint drawing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
København 623404 632340 1.4
Aarhus 277086 280534 1.2
Odense 179601 180302 0.4
Aalborg 115908 117351 1.2
Frederiksberg 103960 104305 0.3
Gentofte 75176 74830 -0.5
Esbjerg 72168 72037 -0.2
Gladsaxe 69512 69112 -0.6
Randers 62586 62482 -0.2
Kolding 60854 61121 0.4
@netsi1964
netsi1964 / usefulExtensions.js
Created June 7, 2020 07:34
Some useful extenstions to javascript
Object.prototype.rad = (deg) => Math.PI/180 * deg;
Object.prototype.deg = (rad) => 180/Math.PI * rad;
Object.prototype.getAngle = (point1, point2) => Math.atan2(point1.y - point2.y, point1.x - point2.x);
Object.prototype.getDistance = (point1, point2) => Math.sqrt(Math.pow(point1.x-point2.x, 2) + Math.pow(point1.y-point2.y, 2));
@netsi1964
netsi1964 / 1search_for_8541.md
Last active October 19, 2019 14:18
Get Markdown from facebook groups search (8541)

Updated: 19.10.2019 15.27.35

8541

Navn Beskrivelse Meta
2iev8541 Gruppe
649 hate! 8541  1 medlemmer
8541  25 medlemmer
8541 Home sweet home  4 medlemmer