Skip to content

Instantly share code, notes, and snippets.

View RickCarlino's full-sized avatar
💾

Rick Carlino RickCarlino

💾
View GitHub Profile
@RickCarlino
RickCarlino / verify.md
Last active March 10, 2020 13:08
Verification of SSB messages in Ruby

Verifying SSB Messages in Ruby

First we need a few dependencies:

require "json"
require "base64"
require "ed25519"
@RickCarlino
RickCarlino / bamboo.md
Created October 26, 2019 20:04
Thinking about Bamboo / Lipmaa backlinks

What is This?

It's a pretty neat thing I found!

Please see the Bamboo project for more info.

Lipmaa Iterative Function

def lipmaa_iterative(n)
@RickCarlino
RickCarlino / launch.json
Created May 20, 2019 18:29
Run Jest tests in VSCode
{
"version": "0.2.0",
"configurations": [
{
"name": "Tests",
"type": "node",
"request": "launch",
"program": "/usr/bin/jest",
"stopOnEntry": false,
"args": [
@RickCarlino
RickCarlino / [email protected]
Created May 18, 2019 22:45 — forked from bcomnes/[email protected]
scuttlebot.service: /etc/systemd/service/[email protected]
[Unit]
Description=sbot
[Service]
ExecStart=/usr/local/bin/sbot server --host example.com --blobs.party
# Track https://github.com/ssbc/patchwork/issues/224 for info on --blobs.party
Restart=on-failure
ReadWriteDirectories=/home/%i/.ssb
User=%i
[
{
"__KIND__": "nothing",
"__parent": {
"value": 0
},
"__body": {
"value": 0
},
"__next": {
@RickCarlino
RickCarlino / output.rb
Created May 11, 2018 16:59
linked output
module Code
class Create
def call(request, hypervisor)
raise "NOT IMPLEMENTED"
end
end
end
module Code
class Close
SELECT sequences.name, tools.name, sequences.device_id
FROM "edge_nodes"
INNER JOIN "sequences" ON sequences.id=sequences.id
INNER JOIN "tools" ON (edge_nodes.value)::int=tools.id
WHERE "edge_nodes"."kind" = 'tool_id' AND sequences.device_id = 95;
# CANONICAL FORM:
{ :kind=>"sequence",
:args=>{:locals=>{:kind=>"scope_declaration", :args=>{}}, :version=>6, :is_outdated=>false},
:body=> [
{ :kind=>"move_absolute",
:args=> {:location=>{:kind=>"coordinate", :args=>{:x=>1, :y=>2, :z=>3}}, :offset=>{:kind=>"coordinate", :args=>{:x=>0, :y=>0, :z=>0}}, :speed=>4}
},
{ :kind=>"move_absolute",
:args=> {:location=>{:kind=>"tool", :args=>{:tool_id=>1}}, :offset=>{:kind=>"coordinate", :args=>{:x=>0, :y=>0, :z=>0}}, :speed=>4}
},
@RickCarlino
RickCarlino / nerves.info.txt
Last active November 7, 2017 04:52
nerves error DHCP gadget stuff
➜ rpi_project git:(master) ✗ env MIX_TARGET=rpi0 mix firmware
Mix environment
MIX_TARGET: rpi0
MIX_ENV: dev
==> dhcp_server
make: Nothing to be done for 'all'.
Compiling 5 files (.ex)
== Compilation error on file lib/dhcp_server/server.ex ==
@RickCarlino
RickCarlino / install.sh
Last active October 29, 2017 15:12
Provisioning a FarmBot Web App server, Ubuntu 17.10
# How to install FarmBot Web API on a Fresh Ubuntu 17 machine.
# Remove old (possibly broke) docker versions
sudo apt-get remove docker docker-engine docker.io
# Install docker
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common --yes
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" --yes
sudo apt-get update --yes