Skip to content

Instantly share code, notes, and snippets.

View nicoandmee's full-sized avatar
🏠
Working from home

Nico Kokonas nicoandmee

🏠
Working from home
View GitHub Profile
View surfingkeys.js
(()=>{var e={856:function(e){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,a){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,a)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function n(e,i,o){return n=a()?Reflect.construct:function(e,a,n){var i=[null];i.push.apply(i,a);var o=new(Function.bind.apply(e,i));return n&&t(o,n.prototype),o},n.apply(null,arguments)}function i(e){return o(e)||r(e)||s(e)||l()}function o(e){if(Array.isArray(e))return c(e)}function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.fr
@nicoandmee
nicoandmee / obsidian-kk.py
Last active July 17, 2023 19:37
obsidian -> keycombiner
View obsidian-kk.py
import csv
import json
import os
import time
from typing import Dict, List, Tuple
import click
import httpx
import pandas as pd
from icecream import ic
View editdistance.py
validation_images = [batch["image"] for batch in validation_dataset] # type: ignore
validation_labels = [batch["label"] for batch in validation_dataset] # type: ignore
def calculate_edit_distance(labels, predictions):
# Get a single batch and convert its labels to sparse tensors.
saprse_labels = tf.cast(tf.sparse.from_dense(labels), dtype=tf.int64)
# Make predictions and convert them to sparse tensors.
input_len = np.ones(predictions.shape[0]) * predictions.shape[1]
predictions_decoded = tf.keras.backend.ctc_decode(
@nicoandmee
nicoandmee / user.js
Created November 27, 2022 16:54 — forked from AetherEternity/user.js
Silent firefox
View user.js
// Mozilla User Preferences
// To change a preference value, you can either:
// - modify it via the UI (e.g. via about:config in the browser); or
// - set it within a user.js file in your profile (create it if it doesn't exist).
//
// Profile folder location on different systems:
// Windows: C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxxx.default
// Mac OS X: Users/<username>/Library/Application Support/Firefox/Profiles/xxxxxxxx.default
// Linux: /home/<username>/.mozilla/firefox/xxxxxxxx.default
View pw-extra.ts
// playwright-extra is a drop-in replacement for playwright,
// it augments the installed playwright with plugin functionality
import { chromium } from 'playwright-extra'
// Load the stealth plugin and use defaults (all tricks to hide playwright usage)
// Note: playwright-extra is compatible with most puppeteer-extra plugins
import StealthPlugin from 'puppeteer-extra-plugin-stealth'
// Add the plugin to playwright (any number of plugins can be added)
chromium.use(StealthPlugin())
View keybase.md

Keybase proof

I hereby claim:

  • I am nicoandmee on github.
  • I am nicomee (https://keybase.io/nicomee) on keybase.
  • I have a public key ASCV0KNXgPBt-qJo11QwSbpH7Y_rxuEbPbYktvDU2MbOHwo

To claim this, I am signing this object:

View prettierrc.json
{
"arrowParens": "always",
"bracketSameLine": true,
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": false,
"printWidth": 80,
@nicoandmee
nicoandmee / getcrx.sh
Last active July 23, 2022 22:10 — forked from bitst0rm/getcrx.sh
A bash script to download chrome extension files from Chrome Web Store
View getcrx.sh
#!/usr/bin/env bash
# A bash script to download chrome extension files from Chrome Web Store
# 30.12.2018, https://github.com/bitst0rm
# 23.07.2022 https://github.com/nicoandmee
# extensions.zip contains URLs to download
if [ ! -f ./extensions.txt ]; then
echo "Missing extensions.txt file."
echo "extensions.txt should contain newline delimited list of webstore links."
View responseinterceptor.js
const replaceProperty = (obj, propName, descriptorOverrides = {}) => {
return Object.defineProperty(obj, propName, {
// Copy over the existing descriptors (writable, enumerable, configurable, etc)
...(Object.getOwnPropertyDescriptor(obj, propName) || {}),
// Add our overrides (e.g. value, get())
...descriptorOverrides
})
}
const replaceWithProxy = (obj, propName, handler) => {
View DumbArduino.ino
#include <FastLED.h>
#include <SPI.h>
#include <String.h>
#include <Wire.h>
#pragma region PIN_DEFINITIONS
#define GAME_START 3
#define GAME_END 4
#define SLAVE_ADDR 9
#define GAME_IRQ 8