Skip to content

Instantly share code, notes, and snippets.

View mishfit's full-sized avatar

Mishael Ochu mishfit

  • Salt Lake City, Utah
View GitHub Profile
@mishfit
mishfit / README.md
Last active March 4, 2018 05:01
IPFS Daemon Debian 9
  1. Compile/Download/Install as detailed at [https://github.com/ipfs/go-ipfs#install]. a. This should create an executable at /usr/local/bin/ipfs
  2. Create a user for the service (I opted to create a regular user with a home directory where an ipfs datastore can 'live'):
$ sudo mkdir /home/ipfs
$ sudo useradd -d /home/ipfs
$ sudo chown -R ipfs:ipfs /home/ipfs
$ sudo chown root:staff /usr/local/bin/ipfs
$ sudo chmod a+rx /usr/local/bin/ipfs
@mishfit
mishfit / CompareAsssertions.sol
Last active February 9, 2018 00:32
Revert Costs Less Than Require
pragma solidity ^0.4.19;
contract CompareAssertions {
function requireExample (uint256 input) public pure returns (uint256) {
require(input > 5);
uint256 result = 5 * input;
require(result > input);
return result;
}
@mishfit
mishfit / repl.js
Created May 22, 2017 04:57 — forked from amasad/repl.js
a project repl
const babel = require('babel-core');
const vm = require('vm');
const repl = require('repl');
let context = repl.start({ eval: evaluate }).context;
// Autorequire all models so that they're available by name in the repl.
const models = require('../server/models');
for (let name in models) {
context[name] = models[name];
@mishfit
mishfit / signersSign.js
Created March 31, 2017 22:29
ZeroNet "signers_sign" Property Formatter
#!/usr/bin/env node
var program = require('commander'),
bitcoin = require('bitcoinjs-lib'),
fs = require('fs');
program
.version('0.0.1')
.usage('[options]')
.option('-c, --number-required <n>', 'number required', parseInt)
@mishfit
mishfit / keybase.md
Created November 16, 2015 18:07
keybase.md

Keybase proof

I hereby claim:

  • I am mishfit on github.
  • I am mishochu (https://keybase.io/mishochu) on keybase.
  • I have a public key whose fingerprint is DD34 E456 85E9 F687 8C18 A47A 6681 8381 7CED B9D4

To claim this, I am signing this object:

@mishfit
mishfit / nlog.json
Created October 13, 2015 19:10
lnav log format for nlog
{
"nlog_log" : {
"title" : "NLog",
"description" : "Super simple log format that color codes log entries based on log level",
"url" : "http://nlog-project.org",
"regex": {
"very-basic" : {
"pattern" : "^(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{4}) (?<level>\\w+) (?<component>(\\w|\\.)+) - (?<body>.*)$"
}
},