Skip to content

Instantly share code, notes, and snippets.

View chmanie's full-sized avatar
🦦

Christian Maniewski chmanie

🦦
View GitHub Profile

Keybase proof

I hereby claim:

  • I am chmanie on github.
  • I am chmanie (https://keybase.io/chmanie) on keybase.
  • I have a public key ASAFB4NQ0BDlZuAIUVEAdEGpvKTb2iOKpmzPA6SNDkUc4Ao

To claim this, I am signing this object:

@chmanie
chmanie / connectall.rb
Created January 26, 2021 18:02
Connect all MIDI inputs to all MIDI outputs (except themselves). Supports multi-port devices
#!/usr/bin/ruby
t = `aconnect -i -l`
$devices = {}
$device = 0
t.lines.each do |l|
match = /client (\d*)\:((?:(?!client).)*)?/.match(l)
# we skip empty lines and the "Through" port
unless match.nil? || match[1] == '0' || /Through/=~l
$device = match[1]
  1. cd mutable-dev-environment
  2. vagrant up
  3. vagrant ssh
  4. cd /vagrant
  5. git clone https://github.com/forestcaver/parasites.git --recursive # Mind the --recursive!!! It will fail at the last step but we'll fix it
  6. cd parasites
  7. git clone https://github.com/mqtthiqs/stmlib.git
  8. cd stmlib && git checkout 8ab2aae
  9. Go into parasites folder and see if there is a folder labeled build, if not, then create one.
  10. Go inside build folder. Create another folder and label the new folder as warps_bootloader
Open On-Chip Debugger 0.9.0 (2020-04-13-15:29)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info updater \OC\Updater::resetLogLevel: Reset log level to Warning(2) 2020-02-18T00:00:37+0100
Info updater \OC\Updater::maintenanceDisabled: Turned off maintenance mode 2020-02-18T00:00:37+0100
Info updater \OC\Updater::updateEnd: Update successful 2020-02-18T00:00:37+0100
Info updater \OC\Updater::finishedCheckCodeIntegrity: Finished code integrity check 2020-02-18T00:00:37+0100
Info updater \OC\Updater::startCheckCodeIntegrity: Starting code integrity check... 2020-02-18T00:00:31+0100
Info updater \OC\Repair::step: Repair step: Reset generated avatar flag 2020-02-18T00:00:31+0100
Debug no app in context Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent 2020-02-18T00:00:31+0100
Info updater \OC\Repair::info: Repair info: Repair step already executed 2020-02-18T00:00:31+0100
Debug no app in context Deprecated event type for \OC\Repair::info: Symfony\Component\EventDispatcher\GenericEvent 2020-02-18T00:00:31+0100
Info updater \OC\Repair::step: Repair step: Se
@chmanie
chmanie / libp2p-discovery.adoc
Last active May 6, 2019 10:11
libp2p discovery options

libp2p discovery options

Module name node support browser support go support works w/o rendezvous server true P2P[1] works w/o bootstrap

libp2p-mdns

X

O

X

X

X

X

libp2p-railing[2]

X

X

X[3]

X

X

O

libp2p-kad-dht

X[4]

X[4]

X

X

X

O

libp2p-webrtc-star

X

X

O

O

X

O[5]

libp2p-websocket-star

X

X

X

O

O

O[5]


1. no tunnel required
2. this is essentially just bootstrapping, not discovery per se
3. via bootstrap config
4. disabled by default, see: libp2p/js-libp2p-kad-dht#86 and ipfs/js-ipfs#1982
5. you have to bootstrap the star itself
@chmanie
chmanie / cre2-include-stdint-headers.patch
Created April 7, 2019 05:49
Patch cre2 to include stdint headers
From d1074223b6efc6fcb47ef06e99620e510d1db79b Mon Sep 17 00:00:00 2001
From: Christian Maniewski <[email protected]>
Date: Fri, 5 Apr 2019 10:08:47 +0000
Subject: [PATCH] Add <stdint.h> include statement
Fixes an issue in src/cre2.h "error: unknown type name 'int64_t'"
---
src/cre2.h | 2 ++
1 file changed, 2 insertions(+)
@chmanie
chmanie / blinky_gen.exs
Created February 17, 2018 00:38
A blinking LED using GenServer
defmodule Blinky do
use GenServer
alias ElixirALE.GPIO
@duration 2000
def start_link(state \\ %{on: true, pid: nil}) do
GenServer.start_link(__MODULE__, state, name: __MODULE__)
end
@chmanie
chmanie / Web3Provider.js
Created November 14, 2017 05:02
MetaMaskSigner / Web3Signer for ethers.js
import { providers } from 'ethers';
import Eth from 'ethjs';
class Web3Provider extends providers.Provider {
constructor() {
super();
// https://github.com/MetaMask/faq/blob/master/detecting_metamask.md#web3-deprecation
if (typeof window.web3 == 'undefined' || typeof window.web3.currentProvider == 'undefined') {
throw new Error('Web3Provider can just be used with a web3 currentProvider injected');
}
@chmanie
chmanie / karma.conf.js
Created August 15, 2016 13:14
Testing react components (local dev)
// Karma configuration
// Generated on Mon Aug 15 2016 14:16:47 GMT+0200 (CEST)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',