Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

export NODE_VER=12.22.7
if ! node --version | grep -q ${NODE_VER}; then
(cat /proc/cpuinfo | grep -q "Pi Zero") && if [ ! -d node-v${NODE_VER}-linux-armv6l ]; then
echo "Installing nodejs ${NODE_VER} for armv6 from unofficial builds..."
curl -O https://unofficial-builds.nodejs.org/download/release/v${NODE_VER}/node-v${NODE_VER}-linux-armv6l.tar.xz
tar -xf node-v${NODE_VER}-linux-armv6l.tar.xz
fi
echo "Adding node to the PATH"
PATH=$(pwd)/node-v${NODE_VER}-linux-armv6l/bin:${PATH}
fi
@nopivnick
nopivnick / error.txt
Last active January 2, 2021 21:47
p5.SceneManager-error_showPreviousScene()-functionality
p5@1.1.9.js:46032
🌸 p5.js says: There's an error as "showPreviousScene" could not be called as a function (on line 36 in sketch.js [http://127.0.0.1:5501/p5/__scenes/sketch.js:36:18]).
Verify whether "sceneManager" has "showPreviousScene" in it and check the spelling, letter-casing (Javacript is case-sensitive) and its type.
For more: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Not_a_function#What_went_wrong
p5@1.1.9.js:46374
▶️ Error at line 36 in "playtestKeyPressed" in sketch.js (http://127.0.0.1:5501/p5/__scenes/sketch.js:36:18)
sketch.js:36
▶️ Called from line 135 in "scene1.keyPressed" in sketch.js (http://127.0.0.1:5501/p5/__scenes/sketch.js:135:5)
@nopivnick
nopivnick / gulp-error_improv-demo.txt
Last active December 19, 2020 17:04
Improv demo gulp error
➜ test_improv-demo git:(master) gulp demo
gulp demo[98946]: ../src/node_contextify.cc:676:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.
1: 0x1012d8685 node::Abort() (.cold.1) [/Users/nopivnick/.nvm/versions/node/v14.15.3/bin/node]
2: 0x1000a6309 node::Abort() [/Users/nopivnick/.nvm/versions/node/v14.15.3/bin/node]
3: 0x1000a6171 node::Assert(node::AssertionInfo const&) [/Users/nopivnick/.nvm/versions/node/v14.15.3/bin/node]
4: 0x100099adb node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/nopivnick/.nvm/versions/node/v14.15.3/bin/node]
5: 0x1002595f8 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/Users/nopivnick/.nvm/versions/node/v14.15.3/bin/node]
6: 0x1002588ac v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>,
@nopivnick
nopivnick / error.txt
Last active January 3, 2020 03:43
Jekyll build error re: faraday v1.0.0
$ bundle exec jekyll serve
Configuration file: /Users/nopivnick/Source/nopivnick/itp.nopivnick.com/_config.yml
Source: /Users/nopivnick/Source/nopivnick/itp.nopivnick.com
Destination: /Users/nopivnick/Source/nopivnick/itp.nopivnick.com/_site
Incremental build: disabled. Enable with --incremental
Generating...
Invalid theme folder: _sass
Remote Theme: Using theme mmistakes/minimal-mistakes
Jekyll Feed: Generating feed for posts
GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
@nopivnick
nopivnick / .gitignore
Created June 9, 2019 21:46
.gitignore for Jekyll sites built locally on macOS and hosted remotely on GitHub Pages
# Ignore folders generated by Bundler
vendor
.bundle
# Ignore folders generated by Jekyll
_site
.sass-cache
.jekyll-metadata
# Ignore folders included in GitHub's default Jekyll .gitignore
@nopivnick
nopivnick / gist:0f0b47f55c74da002bacd498895ca0a7
Created January 7, 2018 01:39
$ nixnote2 sqlExec "Select * from DataStore where lid=1004"
$ nixnote2 sqlExec "Select * from DataStore where lid=1004"
DEBUG 2018-01-06 20:33:15.216 ( gui/shortcutkeys.cpp @ 246 ) Unable to open file for reading or file does not exist.
DEBUG 2018-01-06 20:33:15.216 ( gui/shortcutkeys.cpp @ 246 ) Unable to open file for reading or file does not exist.
ERROR 2018-01-06 20:33:15.217 ( exits/exitmanager.cpp @ 55 ) "Script filename is blank. Disabling exit " "ExitPoint_LoadNote"
ERROR 2018-01-06 20:33:15.217 ( exits/exitmanager.cpp @ 67 ) "Script file doesn't exist or cannot be read. Disabling exit " "ExitPoint_LoadNote"
ERROR 2018-01-06 20:33:15.217 ( exits/exitmanager.cpp @ 55 ) "Script filename is blank. Disabling exit " "ExitPoint_SaveNote"
ERROR 2018-01-06 20:33:15.217 ( exits/exitmanager.cpp @ 67 ) "Script file doesn't exist or cannot be read. Disabling exit " "ExitPoint_SaveNote"
ERROR 2018-01-06 20:33:15.217 ( exits/exitmanager.cpp @ 55 ) "Script filename is blank. Disabling exit " "ExitPoint_ImportKeep"
ERROR 2018-01-06 20:33:15.217 ( exits/exitmanager.cpp
@nopivnick
nopivnick / gist:8f6b19d58ae21401486f3c582e690068
Created January 7, 2018 01:22
NixNote2 message log post-download
DEBUG 2018-01-06 20:13:12.602 ( main.cpp @ 191 ) Program Home: "/usr/share/nixnote2/"
DEBUG 2018-01-06 20:13:12.602 ( main.cpp @ 192 ) Built on Oct 30 2017 at 02:16:47
DEBUG 2018-01-06 20:13:12.602 ( main.cpp @ 193 ) Built with Qt 5.5.1 running on 5.5.1
DEBUG 2018-01-06 20:13:12.603 ( main.cpp @ 253 ) Setting up NN
DEBUG 2018-01-06 20:13:12.613 ( nixnote.cpp @ 130 ) Looking for transaltions: "/usr/share/nixnote2/translations/nixnote2_en_US.qm"
DEBUG 2018-01-06 20:13:12.614 ( sql/databaseconnection.cpp @ 37 ) SQL drivers available: ("QSQLITE")
DEBUG 2018-01-06 20:13:12.616 ( sql/databaseconnection.cpp @ 64 ) *** SQLITE COMPILE OPTIONS ***
DEBUG 2018-01-06 20:13:12.616 ( sql/databaseconnection.cpp @ 66 ) "ENABLE_COLUMN_METADATA"
DEBUG 2018-01-06 20:13:12.616 ( sql/databaseconnection.cpp @ 66 ) "ENABLE_DBSTAT_VTAB"
DEBUG 2018-01-06 20:13:12.616 ( sql/databaseconnection.cpp @ 66 ) "ENABLE_FTS3"
@nopivnick
nopivnick / name-of-plugin.php
Created October 1, 2013 19:37
A .php proxy loader file for loading plugins that are nested in a directory inside /wp-content/mu-plugins.
<?php
/**
* a proxy loader file to load the name-of-plugin in /wp-content/mu-plugins/name-of-plugin
*/
require_once (WPMU_PLUGIN_DIR.'/name-of-plugin/name-of-plugin.php');')
@nopivnick
nopivnick / ssh-reverse-persist.sh
Created September 26, 2013 20:03
A bash script for keeping a reverse SSH tunnel initiated by a machine behind a firewall persistent. If you wanted multiple tunnels (i.e., to multiple hosts) you might paramaterize this then have separate scripts named for each host (e.g., ssh-reverse-persist_host-1.sh, ssh-reverse-persist_host-2.sh) that called ssh-reverse-persist.sh.
#!/bin/bash
createTunnel() {
/usr/bin/ssh -t -t -R 19999:localhost:22 user@example.com
if [[ $? -eq 0 ]]; then
echo Tunnel to example.com created successfully
else
echo An error occurred creating a tunnel to example.com RC was $?
fi
}
@nopivnick
nopivnick / gist:930361
Created April 20, 2011 04:33
gollum heartache 1.1
C:\RubyDevKit>devkitvars.bat
Adding the DevKit to PATH...
C:\RubyDevKit>cd\
C:\>gem install albino --platform=ruby
Successfully installed albino-1.3.3
1 gem installed
Installing ri documentation for albino-1.3.3...
Installing RDoc documentation for albino-1.3.3...