Skip to content

Instantly share code, notes, and snippets.

View asaaki's full-sized avatar
🦀
Oh crab!

Christoph Grabo asaaki

🦀
Oh crab!
View GitHub Profile
@asaaki
asaaki / flurlicht.ino
Created January 30, 2019 09:30
motion sensor / interrupt triggered neopixel light controller
#include <Adafruit_NeoPixel.h>
#include <avr/power.h>
#include <avr/interrupt.h>
#include <avr/sleep.h>
#define STRIP_PIN 6
#define TRIGGER_PIN 2
#define CONTROL_LED 13
// Note: this duration should be also longer than the HIGH time of the PIR
@alexheretic
alexheretic / latest-stable-rustc.md
Last active March 28, 2023 17:13
Latest stable rust as a MSRV policy

Latest stable rust as a minimum

Minimum supported rust version (MSRV) policy that indicates the most recent stable rust release is the minimum whenever a new crate version is published. It is not required to bump a crate's major version after a new stable compiler is released.

For example crate_foo version 0.1.2 published on 2018-12-28 has MSRV 1.31.1 as this compiler was published on 2018-12-20.

The advantages of this approach is simplicity in maintaining a crate's code.

Workarounds for older compiler versions

If you are unable to update your compiler, you may be unable to update crate dependencies following this policy.

@pedrouid
pedrouid / webcrypto-examples.md
Created December 15, 2018 01:07
Web Cryptography API Examples
@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@dlaehnemann
dlaehnemann / flamegraph_rust.md
Last active February 14, 2024 14:14
flamegraphing rust binaries' cpu usage with perf
@Silhoue
Silhoue / librato.js
Last active September 28, 2018 16:52
Librato - find metrics in use & missing metrics
const fetch = require("node-fetch");
const util = require('util')
const USER = "..."
const TOKEN = "..."
const spacesUrl = offset => `https://metrics-api.librato.com/v1/spaces?offset=${offset}`;
const chartsUrl = spaceId => `https://metrics-api.librato.com/v1/spaces/${spaceId}/charts`
const authOptions = {
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 17, 2025 09:00
set -e, -u, -o, -x pipefail explanation
@skade
skade / code_demo.rs
Created September 8, 2018 18:58
Code demo of an API experiment for a database mapper.
let mut changeset = BlogRepository::change().inserts::<Posts>();
for id in 1..=3 {
let post = Post { id: id, content: format!("Post number {}", id) };
changeset.push(post);
}
let mut changeset = changeset.inserts::<Comments>();
@michalmuskala
michalmuskala / decode.txt
Last active June 3, 2022 09:32
Jason benches
Operating System: macOS"
CPU Information: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Number of Available Cores: 8
Available memory: 16 GB
Elixir 1.7.0-dev
Erlang 21.0
Benchmark suite executing with the following configuration:
warmup: 5 s
time: 30 s