Skip to content

Instantly share code, notes, and snippets.

@ret
ret / gist:11fc6c5d231940d77f19f0a6d9bcb69f
Last active December 29, 2019 18:17
Layout Signal(16) across icebreaker pmod 1A and 1B (nMigen)
# Connect 0:15 of led_panel to PMOD 1A and 1B.
#
platform.add_resources([
Resource("pmod1A", 0, Pins(" 4 2 47 45 3 48 46 44", dir="o")),
Resource("pmod1B", 0, Pins("43 38 34 31 42 36 32 28", dir="o"))
])
pmod1A = platform.request("pmod1A", 0)
pmod1B = platform.request("pmod1B", 0)
m.d.comb += pmod1A.eq(d.led_panel[0: 8]) # LSB
m.d.comb += pmod1B.eq(d.led_panel[8:16]) # MSB
@ret
ret / SketchSystems.spec
Created November 23, 2019 01:42 — forked from lynaghk/SketchSystems.spec
Egg Timer*
Egg Timer*
Stopped*
wind forward -> Done?
Ticking
wind forward -> Done?
wind backward -> Done?
tick -> Done?
Done?
@ret
ret / SketchSystems.spec
Last active November 23, 2019 01:29
My Awesome Sketch
My Awesome Sketch2
First State2
some event -> Second State2
Second State2
theory
Consensus_Demo
imports
Network
begin
datatype 'val msg
= Propose 'val
| Accept 'val
@ret
ret / top.il
Created August 29, 2019 22:39
repro files: yosys 0.9 generating extra spaces in .json parameters
NOTE:
Yosys version: `Yosys 0.9+1 (git sha1 a0b666f2, clang 10.0.1 -fPIC -Os)`
Steps to repro issue of extra spaces in PULLUP parameter value (top.json output) value generated by .ys script:
This gist includes the `top.il`, and `.v` files needed to repro.
Nextpnr fails with the spaces in the .json file `ERROR: expected numeric value for parameter 'PULLUP' on cell 'uart_0__rx_0'`.
module LEDsMojo.GameOfLife (CellT, gameOfLife) where
import qualified Data.List as L ((\\))
import Data.Sized.Matrix as M
import Data.Sized.Unsigned
import Language.KansasLava
type CellT = Bool
gameOfLife :: Matrix (X8, X16) CellT -> Signal CLK Bool -> Matrix (X8, X16) (Signal CLK CellT)
@ret
ret / Dockerfile
Created July 26, 2018 21:29 — forked from creichert/Dockerfile
ghcjs-8.4 with stack.
FROM ubuntu:16.04
## ensure locale is set during build
ENV LANG C.UTF-8
## Haskell environment
RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main' > \
/etc/apt/sources.list.d/ghc.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286 && \
apt-get update && \
@ret
ret / README.lhs
Created May 23, 2017 01:29 — forked from dysinger/README.lhs
Single-file executable literate Haskell with Stack
#!/usr/bin/env stack
> -- stack --resolver lts-6 --install-ghc runghc --package classy-prelude --package lens --package wreq
Blah Blah words about this single file executable README goes here.
> {-# LANGUAGE DeriveAnyClass #-}
> {-# LANGUAGE DeriveGeneric #-}
> {-# LANGUAGE NoImplicitPrelude #-}
> {-# LANGUAGE OverloadedStrings #-}

How to combine AWS Elastic Beanstalk, Docker and AWS CloudFormation

Introduction

This text explains how to create and deploy a Docker-based AWS Elastic Beanstalk site and how to control it using CloudFormation.

Please find the CloudFormation template at the end of this Gist.

We assume that you are familiar with AWS ElasticBeanstalk, AWS CloudFormation and Docker.

### Keybase proof
I hereby claim:
* I am ret on github.
* I am oter (https://keybase.io/oter) on keybase.
* I have a public key whose fingerprint is F8EA 2BE7 C4C9 D7B8 6C5F B8B8 DEFA 5798 AC12 F606
To claim this, I am signing this object: