Skip to content

Instantly share code, notes, and snippets.

Avatar
🚴

Pierre Beaucamp pierrebeaucamp

🚴
View GitHub Profile
@pierrebeaucamp
pierrebeaucamp / default.nix
Created Nov 23, 2017
Risc-v Qemu on NixOS
View default.nix
with (import <nixpkgs> {});
stdenv.mkDerivation {
name = "qemu-riscv";
src = ./.;
buildInputs = [
alsaLib glib libaio libpulseaudio perl pixman pkgconfig python2 SDL zlib
];
View error.idr
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
View gist:4bfb4972cf26c2e71de58196f9794eea
data:image/gif;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3UBAQJmTkP+8vH9QUK+vr8ZWSHpzcJMmILdwcLOGcHRQUHxwcK9PT9DQ0O/v70w5MLypoG8wKOuwsP/g4P/Q0IcwKEswKMl8aJ9fX2xjdOtGRs/Pz+Dg4GImIP8gIH0sKEAwKKmTiKZ8aB/f39Wsl+LFt8dgUE9PT5x5aHBwcP+AgP+WltdgYMyZfyywz78AAAAAAAD///8AAP9mZv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
View mgo.go
package main
import (
"log"
"time"
mgo "gopkg.in/mgo.v2"
)
func init() {
@pierrebeaucamp
pierrebeaucamp / main.go
Created Aug 2, 2016
Celebrating premature optimization
View main.go
package main
import (
"fmt"
"time"
)
func main() {
var intTrash int
var byteTrash byte
@pierrebeaucamp
pierrebeaucamp / main.go
Created Jul 22, 2016
Poor mans tail-call optimization for go
View main.go
package main
import (
"fmt"
"time"
)
func fib_iter(n int) int {
current := 0
prev := 1
@pierrebeaucamp
pierrebeaucamp / LeanCanvas.md
Created Nov 12, 2015
A Lean Canvas in markdown
View LeanCanvas.md

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 / adblock.sh
Last active Aug 29, 2015
OpenWRT AdBlock Script
View adblock.sh
#!/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
View soundcloud-alarm.py
# 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:
You can’t perform that action at this time.