Skip to content

Instantly share code, notes, and snippets.

View mistakia's full-sized avatar

trashman mistakia

View GitHub Profile
@mistakia
mistakia / homebrew old version.txt
Created October 18, 2023 16:15 — forked from sawant/homebrew old version.txt
Install older version of Formula in Homebrew
[From: http://hanxue-it.blogspot.com/2018/08/macos-homebrew-installing-older-version-of-software.html - just created a copy to keep it for long term]
Homebrew always wants to install the latest version of the Formula (software). This is by design, because every time there is an update to a formula, it wants to be tested against all the other formulas that it depends on. Mixing new and old versions of software is a recipe for incompatibility disaster.
But sometimes there are situations where you need an older version of software. In my specific case, Yarn was compiled against an older version of icu4c, and I want that older version instead of recompiling Yarn.
$ yarn install
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.61.dylib
Referenced from: /usr/local/bin/node
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Nano.Community Protocol Ideas

Core Goals

  • moderate & organize content (via tagging & voting)
  • plan & fund objectives
  • measure key results & deliverables

Design Goals

  • distributed infastructure with no reliance on singular entities
Calculations based on the last three years of stats.
value: points scored over replacement player (based on league format).
points: average points scored for a given finish.
regression: earned salary fit to a linear (QB) or exponential (RB, WR, TE) regression line of best fit.
salary: average earned salary of the player for a given finish (Ex. WR2)
┌──────────┬────────┬────────────┬────────┬────────┐
│ position │ value │ regression │ salary │ points │
├──────────┼────────┼────────────┼────────┼────────┤
#!/usr/bin/env node
const e131 = require('e131')
const ws281x = require('rpi-ws281x-native')
function throttled(delay, fn) {
let lastCall = 0;
return function (...args) {
const now = (new Date).getTime();
if (now - lastCall < delay) {
return;
const moment = require('moment')
const Logger = require('logplease')
const logger = Logger.create('finance')
const market_rate = 0.04
let current_year = new moment().format('YYYY')
/////////////// Personal Info
@mistakia
mistakia / check.py
Created June 21, 2018 16:46
Nanopool Miner Check
#!/usr/bin/env python
import smtplib
from email.mime.text import MIMEText
import os.path
import urllib2
from urllib2 import urlopen
import json
import os
@mistakia
mistakia / Peer1.js
Last active March 6, 2018 17:30
OrbitDB syncing
const wrtc = require('wrtc') // or require('electron-webrtc')()
const WStar = require('libp2p-webrtc-star')
const wstar = new WStar({ wrtc: wrtc })
const IPFS = require('ipfs')
const OrbitDB = require('orbit-db')
// OrbitDB uses Pubsub which is an experimental feature
// and need to be turned on manually.
// Note that these options need to be passed to IPFS in
// all examples even if not specfied so.
@mistakia
mistakia / index.js
Created January 8, 2018 17:09
Detecting media links in an html page
/* global module, require */
var parse = require('parse')
var request = require('requestretry')
var async = require('async')
var URI = require('urijs')
var domain = require('domain')
var cheerio = require('cheerio')
function isURL (text) {
@mistakia
mistakia / index.js
Created September 7, 2017 16:10
CohenBot
const get_activity = require('espnff').get_activity
const moment = require('moment')
const jsonfile = require('jsonfile')
const Logger = require('logplease')
const path = require('path')
const async = require('async')
const API = require('groupme').Stateless
const config = require('./config')