Skip to content

Instantly share code, notes, and snippets.

@rektide
rektide / index.html
Last active August 23, 2022 18:46
Unique-ify: In Place or At Finish (http://jsbench.github.io/#bdd6c20c07e440f32d567c59ad4f5e9a) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Unique-ify: In Place or At Finish</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@rektide
rektide / hn-domain-filter.user.js
Created June 30, 2021 21:41
Filter HN rows by domain
// ==UserScript==
// @name Url Filterer
// @namespace Violentmonkey Scripts
// @match https://news.ycombinator.com/*
// @grant none
// @version 1.0
// @author -
// @description 6/30/2021, 5:27:00 PM
// ==/UserScript==
const BANNED = [
arm-openwrt-linux-muslgnueabi-gcc -Os -pipe -o /usr/local/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/node-v12.19.0/out/Release/obj.target/uvwasi/deps/uvwasi/src/uvwasi.o ../deps/uvwasi/src/uvwasi.c '-DV8_DEPRECATION_WAR
NINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D__STDC_FORMAT_MACROS' '-D_GNU_SOURCE' '-D_POSIX_C_SOURCE=200112' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I/usr/local/src/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/
include -I../deps/uvwasi/include -I../deps/uv/include -pthread -Wall -Wextra -Wno-unused-parameter -fvisibility=hidden -O3 -fno-omit-frame-pointer -MMD -MF /usr/local/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/node-v12.
19.0/out/Release/.deps//usr/local/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/node-v12.19.0/out/Release/obj.target/uvwasi/deps/uvwasi/src/uvwasi.o.d.raw -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unuse
d-but-set-variable -Wno-error=unused-result -mfl
@rektide
rektide / gstreamer-err.log
Last active October 17, 2020 16:52
openwrt make log
Installing /mnt/keepstar/exkay/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gst-plugins-base-1.18.0/openwrt-build/po/uk.gmo to /mnt/keepstar/exkay/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gst-plugins-base-1.18.0/ipkg-install/usr/share/locale/uk/LC_MESSAGES/gst-plugins-base-1.0.mo
Installing /mnt/keepstar/exkay/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gst-plugins-base-1.18.0/openwrt-build/po/vi.gmo to /mnt/keepstar/exkay/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gst-plugins-base-1.18.0/ipkg-install/usr/share/locale/vi/LC_MESSAGES/gst-plugins-base-1.0.mo
Installing /mnt/keepstar/exkay/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gst-plugins-base-1.18.0/openwrt-build/po/zh_CN.gmo to /mnt/keepstar/exkay/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gst-plugins-base-1.18.0/ipkg-install/usr/share/locale/zh_CN/LC_MESSAGES/gst-plugins-base-1.0.mo
Installing /mnt/keepstar/exkay/src/openwrt
@rektide
rektide / return-passed-through.js
Last active June 26, 2020 18:35
Does calling return on a generator call return on what it's iterating?
// test for https://mobile.twitter.com/RangerMauve/status/1276579544766578688
var fn = {
[Symbol.asyncIterator]: function(){return fn},
next: async function(){
console.log("iterating")
return { value: 42, done : false }
},
return: function(){
console.log("return")
@rektide
rektide / reply-0-unsent.md
Last active February 2, 2020 00:15
Trying to adopt Hasura from Apollo Server

Unsent reply to hasura/graphql-engine#3812, on Apollo Server users adoptiong Hasura:

Anyways, my point being is that from a data standpoint you could swap Apollo out for any other spec-compliant server in theory with zero effects (minus whatever vendor-specific tooling you may be using around it).

I'll try to explore this further, but it seems like there's a lot of Apollo systems that we still depend on. There are mutation systems, there are operational concerns.

In terms of getting Hasura into production, ripping out all of our Apollo Server work & replacing it all with Hasura & throwing a big switch over is a very very very intimidating proposal. I appreciate & think you are so very correct technically on so many fronts @GavinRay97, but I would really appreciate a more meet-in-middle path to migration onto Hasura.

GraphQL does not exist. It is not a technology, framework, or library you can download & install. GraphQL is a specification -- an i

@rektide
rektide / defense.md
Created April 12, 2019 16:18
Digital Defense Against the Dark Arts

Editor: all that follows is a backed up post. Seems like it could be useful in a lot of settings, as well as when dealing with the terroristic Fox News Nazis.

ok, I wrote up a guide to what to do if you're targeted by the right-wing smear machine. (remember that your relative importance doesn't matter AT ALL; they love crushing the defenseless even more.) https://mobile.twitter.com/chick_in_kiev/status/1116499716911652864

What to do if you find yourself targeted online:

  1. Lock down your social media accounts for 24-48 hours (the approximate period of a shitstorm)- ALL OF THEM, not just Twitter.
  2. Check out http://crashoverridenetwork.com for a comprehensive guide to digital safety.
  3. If you're getting death threads, use a service like http://abine.com/deleteme or privacyduck to wipe info from people-finding websites like whitepages and spokeo.
@rektide
rektide / build.log
Created November 4, 2018 22:39
lede build error
make[3]: Entering directory '/usr/local/src/lede/package/base-files'
rm -f /usr/local/src/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x/base-files/.configured_*
rm -f /usr/local/src/lede/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/stamp/.base-files_installed
[ -s /usr/local/src/lede/key-build -a -s /usr/local/src/lede/key-build.pub ] || /usr/local/src/lede/staging_dir/host/bin/usign -G -s /usr/local/src/lede/key-build -p /usr/local/src/lede/key-build.pub -c "Local build key"
[ -s /usr/local/src/lede/key-build.ucert ] || /usr/local/src/lede/staging_dir/host/bin/ucert -I -c /usr/local/src/lede/key-build.ucert -p /usr/local/src/lede/key-build.pub -s /usr/local/src/lede/key-build
Makefile:205: recipe for target '/usr/local/src/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x/base-files/.configured_4d5248d1a6ded9ff903db6e28899f202_8e081b74cf069e1e6800a5bbcbb282f0' failed
make[3]: *** [/usr/local/src/lede/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eab
@rektide
rektide / css-cascade.markdown
Created October 28, 2018 19:01
CSS Cascade
@rektide
rektide / getter-setter-ideal.js
Created October 12, 2018 19:19
Properties the declarative way
const $frequency = Symbol.for("Overthruster:frequency")
export class Overthruster
{
constructor({frequency}={}){
this[$frequency]= frequency
}
get frequency(){
return this[ $frequency]
}