Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
nothingismagick / index.html
Created Jun 29, 2021
Minimal Tauri "read public key" translation from Electron Sample
View index.html
<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();
View Shots
getranke hoffman
- schnelltests
- handschuhe
- external battery
View GH Activity Feed
❗️ Closed issue #48 in iotaledger/
🗣 Commented on #48 in iotaledger/
❗️ Opened issue #74 in iotaledger/
🗣 Commented on #135 in tauri-apps/tauri-docs
🎉 Merged PR #1024 in tauri-apps/tauri
We couldn’t find that file to show.
nothingismagick / post-commit
Last active Mar 11, 2019 — forked from danmichaelo/post-commit
Git post-commit: update api docs on gh-pages branch for GitHub Pages
View post-commit
#!/usr/bin/env bash
### The following block runs after commit to "master" branch
if [ `git rev-parse --abbrev-ref HEAD` == "master" ]; then
echo "Updating API documentation at the gh-pages branch..."
nothingismagick / jest-loader.js
Created Dec 4, 2018
<test lang="jest"> template loader for Vue SFC
View jest-loader.js
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 /
Created Nov 16, 2018 — forked from snowyu/
Add the typescript supports to quasar framework

Note: This guide applies to the project created by quasar-cli.

First install typescript and ts-loaderpackages in your project.

npm i -D typescript ts-loader

Then modified the quasar.conf.js file in your project:

nothingismagick / caret.js
Last active Sep 15, 2021
Small script to detect caret pixel position in contenteditable div
View caret.js
* 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

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


module.exports = {
  NODE_ENV: 'development',
  FOO: 'bar'