Skip to content

Instantly share code, notes, and snippets.

echo $(curl -s http://www.dinopass.com/password/strong)-$(curl -s http://www.dinopass.com/password/strong)
@sykesm
sykesm / borked.go
Last active May 9, 2016 17:38
Namespace confusion
package main
import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"runtime"
"github.com/cloudfoundry-incubator/ducati-daemon/lib/namespace"
@sykesm
sykesm / transform-leases.pl
Last active April 22, 2022 07:59
Transform dnsmasq leases to ISC lease file format.
#!/usr/bin/perl
use NetAddr::IP;
use POSIX qw(strftime);
my $dnsmasq_leases_path = '/var/run/dnsmasq-dhcp.leases';
my $dhcpd_leases_path = '/var/run/dhcpd.leases';
my $network_names_path = '/opt/vyatta/config/active/service/dhcp-server/shared-network-name';
my %networks_by_subnet;

Keybase proof

I hereby claim:

  • I am sykesm on github.
  • I am sykesm (https://keybase.io/sykesm) on keybase.
  • I have a public key whose fingerprint is 4884 F32E 7A73 3714 3FCA 540D BDBE CC3A C6E8 562A

To claim this, I am signing this object:

@sykesm
sykesm / inconsolata-dz.css
Last active March 4, 2018 15:40
Blink Shell Inconsolata-dz for Powerline
@font-face {
font-family: "Inconsolata-dz for Powerline";
font-style: normal;
font-weight: normal;
src: url(data:font/opentype;charset-utf-8;base64,T1RUTwALAIAAAwAwQ0ZGIFWjzGQAAAo0AABX1kZGVE1bUJ1iAABkjAAAABxHREVGAVoABAAAYgwAAAAgT1MvMl4Wx0gAAAEgAAAAYGNtYXD6yx74AAAGnAAAA3ZoZWFk/OhPcgAAALwAAAA2aGhlYQboAW4AAAD0AAAAJGhtdHg1ZDKaAABiLAAAAl5tYXhwAS1QAAAAARgAAAAGbmFtZUgkeAsAAAGAAAAFHHBvc3T/hgAzAAAKFAAAACAAAQAAAAECjz7UcWpfDzz1AAsD6AAAAADNuYSFAAAAAM25hIX/4P8tAnYDxwAAAAgAAgAAAAAAAAABAAADx/8zAMgCV//g/+ECdgABAAAAAAAAAAAAAAAAAAAAAgAAUAABLQAAAAMCVwH0AAUACAKKArwAAACMAooCvAAAAeAAMQECAAACCwYJAwADAAAAgAAALwAAAWsAAAAAAAAAAFBmRWQAQAAg4LMDNP9MAAADxwDNAAAAEwAAAAACEQLSACAAIAABAAAAEgDeAAEAAAAAAAAAmwE4AAEAAAAAAAEAHAIOAAEAAAAAAAIAAgIxAAEAAAAAAAMAKgKKAAEAAAAAAAQAHALvAAEAAAAAAAUAEAMuAAEAAAAAAAYAGgN1AAEAAAAAABAAHAPKAAEAAAAAABIAHAQhAAMAAQQJAAABNgAAAAMAAQQJAAEAOAHUAAMAAQQJAAIABAIrAAMAAQQJAAMAVAI0AAMAAQQJAAQAOAK1AAMAAQQJAAUAIAMMAAMAAQQJAAYANAM/AAMAAQQJABAAOAOQAAMAAQQJABIAOAPnAEMAcgBlAGEAdABlAGQAIABiAHkAIABSAGEAcABoACAATABlAHYAaQBlAG4AIAB1AHMA
#!/bin/bash -ex
pwd
# /Users/cfdojo/workspace/fabric/standalone
killall orderer peer
rm -rf output peer1 peer2
mkdir -p output/crypto
cryptogen generate --config testdata/crypto-config.yaml --output output/crypto
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package simple
import (
"fmt"
@sykesm
sykesm / pluginfactory.go
Last active February 25, 2019 14:03
Possible use of reflection to address interface compatibility issues with vending of bccsp plugin.
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package factory
import (
"errors"
@sykesm
sykesm / launching.md
Last active May 17, 2019 07:54
Process based launch propsoal

Goals

  • Provide Fabric operators with a mechanism to build and launch chaincode outside of Docker
  • Begin the process of decoupling and extracting chaincode build processing from the peer

Background

Our current chaincode deployment model looks a lot like a PaaS; chaincode developers write code in the language of their choice and push it to the peer for execution. The peer, on demand, transforms the code into an executable package, launches the chaincode in an execution environment, and routes requests to the running chaincode.

Unfortunately, we have implemented this by hard coding the logic for packaging, building, and running chaincode inside Docker containers. In addition to making it difficult to experiment with new chaincode types, the implementation requires operators to grant the peer access to a Docker daemon. Since Docker daemon access enables the peer to perform a number of privileged actions, it's strongly discouraged in security conscious environments. This binding also prevents operators

@sykesm
sykesm / launcher.slide
Created August 16, 2019 17:54
updated launcher proposal
External Chaincode Launcher
Roadmap
Matthew Sykes
IBM
[email protected]
* Why?