Skip to content

Instantly share code, notes, and snippets.

View nothingismagick's full-sized avatar

nothingismagick

View GitHub Profile
@nothingismagick
nothingismagick / index.html
Created June 29, 2021 19:05
Minimal Tauri "read public key" translation from Electron Sample
<html>
<head>
<script type="module">
import { invoke } from './@tauri-apps/api/tauri.js'; // just copied from node_modules
function getPubkey() {
return invoke("show_pubkey").then((message) => message);
}
document.getElementById("clicky").addEventListener("click", async function () {
document.getElementById("key").innerHTML = await getPubkey();
@nothingismagick
nothingismagick / Shots
Created May 29, 2021 10:02
Berlin shotlist
HANDLUNG
getranke hoffman
SAMSTAG
Einkaufen
- schnelltests
- handschuhe
- external battery
@nothingismagick
nothingismagick / test.md
Created January 13, 2020 13:15
markdown test

🔥

@nothingismagick
nothingismagick / GH Activity Feed
Last active October 29, 2020 13:40
GH Activity Feed
❗️ Closed issue #48 in iotaledger/stronghold.rs
🗣 Commented on #48 in iotaledger/stronghold.rs
❗️ Opened issue #74 in iotaledger/chronicle.rs
🗣 Commented on #135 in tauri-apps/tauri-docs
🎉 Merged PR #1024 in tauri-apps/tauri
@nothingismagick
nothingismagick / gist:56f1f3424802f636a0de435a1a9141cc
Last active September 5, 2020 01:22
📊 Weekly development breakdown
We couldn’t find that file to show.
@nothingismagick
nothingismagick / post-commit
Last active March 11, 2019 10:40 — forked from danmichaelo/post-commit
Git post-commit: update api docs on gh-pages branch for GitHub Pages
#!/usr/bin/env bash
###
### The following block runs after commit to "master" branch
###
if [ `git rev-parse --abbrev-ref HEAD` == "master" ]; then
echo
echo "Updating API documentation at the gh-pages branch..."
echo
@nothingismagick
nothingismagick / jest-loader.js
Created December 4, 2018 22:49
<test lang="jest"> template loader for Vue SFC
const fs = require('fs')
const loaderUtils = require('loader-utils')
const path = require('path')
module.exports = function (source) {
const options = loaderUtils.getOptions(this)
const filename = path.parse(this.resourcePath).name
const extension = (options && options.extension) || '_jest.spec.js'
@nothingismagick
nothingismagick / caret.js
Last active April 16, 2024 10:09
Small script to detect caret pixel position in contenteditable div
/**
* Get the caret position in all cases
*
* @returns {object} left, top distance in pixels
*/
getCaretTopPoint () {
const sel = document.getSelection()
const r = sel.getRangeAt(0)
let rect
let r2
@nothingismagick
nothingismagick / Description.md
Last active September 20, 2018 13:49
Quasar ENV

So you want to use ENV vars. Good on you. Here is a quick snippet to help you manage that.

/config/index.js

module.exports = {
  NODE_ENV: 'development',
  FOO: 'bar'
}
@nothingismagick
nothingismagick / a11y.md
Created August 20, 2018 14:31
a11y and ARIA research for quasar