Skip to content

Instantly share code, notes, and snippets.

View nickwynja's full-sized avatar

Nick Wynja nickwynja

View GitHub Profile
.command('sync', 'connect to peers and sync', async () => {
const ssb = require("./ssb");
const cooler = await ssb({ offline: true });
const { meta } = require("./models")({cooler});
await new Promise((r) => setTimeout(r, 1000));
console.log('syncing');
const done = await meta.sync();
process.exit()
})
@nickwynja
nickwynja / gist:26431e1c3a69164c6fe3cbd37339e5c1
Last active April 10, 2020 12:49
Method to get blobs from recent posts
// @TODO: Get blobs somehow
const myFeedId = ssb.id;
const source = ssb.query.read(
configure({
query: [
{
$filter: {
value: {
timestamp: { $lte: Date.now() },
@nickwynja
nickwynja / gist:f8c78d1afb06a8830bbb7519bef21803
Created October 20, 2016 01:11 — forked from reidransom/gist:6042016
Auto-starting VirtualBox VMs on OS X

Auto-starting VirtualBox VMs on OS X

After finding a lot of other posts on the topic that didn't work out for me this one did the trick so I'm reposting for my own sense of self preservation.

Link to original article.

Copy the Virtualbox autostart plist template file to your system's LaunchDaemons folder.

sudo cp \

/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist \

@nickwynja
nickwynja / gist:ccc199c9fd7b5f3bf816
Created February 23, 2015 15:58
Gantt Charts with Mermaid
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="https://raw.githubusercontent.com/knsv/mermaid/master/dist/mermaid.full.js"></script>
<link rel="stylesheet" href="seq.css"/>
<script>
var mermaid_config = {
startOnLoad:true
  • Downloaded video conversion to iTunes (for copying movies to iPad)
    • May be less necessary if I go to Plex set up
  • Hazel for organizing directories
    • Could be replaced by a unix tool
  • Local backups of iOS devices
  • Could be done using MBA that replaces mini server
<div class="builder-container-background-wrapper builder-container-outer-wrapper builder-container">
<div class="top-bar-container">
<div class="main-nav-dropdown container">
<div class="row-fluid category-3 masthead-dropdown has-sidebar hidden" data-id="category-3">
<div class="small-2 menu-background subcategory">
<ul><li class="selected" data-id="category8"><a href="http://www.artofmanliness.com/category/a-mans-life/lessons-in-manliness/">Lessons In Manliness</a></li>
<li class="crm-not-selected" data-id="category73"><a href="http://www.artofmanliness.com/category/a-mans-life/manvotional/">Manvotionals</a></li>
<li class="crm-not-selected" data-id="category211"><a href="http://www.artofmanliness.com/category/a-mans-life/etiquette/">On Etiquette</a></li>

Camp Supplies

  • Tent and Drop Sheet
  • Hiking Pack
  • Sleeping Bag
  • Therm-a-rest
  • Pots
  • Personal Cutlery
  • Cups
  • Bowls
  1. Pocket Notebook
  • Scratch pad
  • Field Notes or Doane grid+lines
  • Scribbling things as they come up during the day
  • Primary inbox
  1. Daily Planner (not to plan but to log)
  • I use the Hobonichi Techo
  • Logging life
  • Writing down important things that happened that I don't want to forget about
  1. Trello
@nickwynja
nickwynja / gist:8714812
Created January 30, 2014 18:04
Hazel: Check for git changes
# Update the index
git update-index -q --ignore-submodules --refresh
err=0
# Disallow unstaged changes in the working tree
if ! git diff-files --quiet --ignore-submodules --
then
err=1
fi
@nickwynja
nickwynja / gist:7156426
Created October 25, 2013 15:21
Open in Marked
try
tell application "BBEdit"
if front window exists then
if class of front window is not in {shell window, scratchpad_window} then
tell front text document of front window
if its file ≠ missing value then
set frontTextDoc to its file as alias
else
error "The Front Text Document Is Unsaved!"
end if