Skip to content

Instantly share code, notes, and snippets.

View pierrebeaucamp's full-sized avatar

Pierre Beaucamp pierrebeaucamp

View GitHub Profile
@pierrebeaucamp
pierrebeaucamp / LeanCanvas.md
Created November 12, 2015 04:05
A Lean Canvas in markdown

Lean Canvas

The Lean Canvas is a version of the Business Model Canvas adapted by Ash Maurya specifically for startups. You can read more about it here.

Problem

Top 3 Problems

@pierrebeaucamp
pierrebeaucamp / Dockerfile
Created December 2, 2020 16:00
Docker stopsignal debugging
FROM ubuntu:latest
COPY signals.sh signals.sh
ENV STOPSIGNAL=SIGTERM
STOPSIGNAL ${STOPSIGNAL}
ENTRYPOINT ["/bin/bash"]
CMD ["./signals.sh"]
@pierrebeaucamp
pierrebeaucamp / default.nix
Created November 23, 2017 14:59
Risc-v Qemu on NixOS
with (import <nixpkgs> {});
stdenv.mkDerivation {
name = "qemu-riscv";
src = ./.;
buildInputs = [
alsaLib glib libaio libpulseaudio perl pixman pkgconfig python2 SDL zlib
];
interface Foo ty where
doStuff : (Eq eq) => ty -> eq
data Bar : Type where
MkBar : (Eq eq) => eq -> Bar
Foo Bar where
doStuff (MkBar x) = x
@pierrebeaucamp
pierrebeaucamp / mgo.go
Last active August 4, 2016 21:01
Bug hunting
package main
import (
"log"
"time"
mgo "gopkg.in/mgo.v2"
)
func init() {
@pierrebeaucamp
pierrebeaucamp / main.go
Created August 2, 2016 19:06
Celebrating premature optimization
package main
import (
"fmt"
"time"
)
func main() {
var intTrash int
var byteTrash byte
@pierrebeaucamp
pierrebeaucamp / main.go
Created July 22, 2016 02:42
Poor mans tail-call optimization for go
package main
import (
"fmt"
"time"
)
func fib_iter(n int) int {
current := 0
prev := 1
@pierrebeaucamp
pierrebeaucamp / soundcloud-alarm.py
Last active December 14, 2015 22:27
Soundcloud Alarm
# The MIT License (MIT)
#
# Copyright (c) 2015 Pierre Beaucamp <mail@pierrebeaucamp.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@pierrebeaucamp
pierrebeaucamp / adblock.sh
Last active August 29, 2015 14:15
OpenWRT AdBlock Script
#!/bin/sh
# The MIT License (MIT)
#
# Copyright (c) 2015 Pierre Beaucamp <mail@pierrebeaucamp.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell