Skip to content

Instantly share code, notes, and snippets.

View outofambit's full-sized avatar
🐢
sometimes slow to respond

cypress evelyn masso outofambit

🐢
sometimes slow to respond
View GitHub Profile
@brysonian
brysonian / Thing.js
Last active May 8, 2019 03:40
Thinking about an alternate API for p5.js's "instance mode"
import {
rect,
fill,
} from './p5';
export default class Thing {
x = 0;
y = 0;
speed = 0;
@xavierfoucrier
xavierfoucrier / gpg-signing.md
Last active July 16, 2024 02:55
GPG signing with Git and Github Desktop

GPG signing – git github-desktop

Here is a short guide that will help you setup your environment to create signed commits or signed tags with Git locally. This has been extensively tested on Windows with Git and the Github Desktop application: I use it every day for my professional development projects.

I you face any issue, feel free to leave a comment below.

Summary

  1. Sign commits or tags
  2. Key passphrase
  3. Disable signatures
  4. Renew a GPG key
@tsubery
tsubery / phoenix_session_test.md
Last active May 17, 2022 21:50
How to set session in phoenix controller tests

If you are reading this, you probably tried to write code like this

test "testing session" do
  build_conn()
  |> put_session(:user_id, 234)
  |> get("/")
  ...
  end

And got this exception:

@mcguinness
mcguinness / umbrella
Created August 23, 2016 03:58 — forked from quinncomendant/umbrella
OpenDNS umbrella start/stop script for Mac OS X. This makes it easy to turn umbrella off temporarily, or get its status.
#!/usr/bin/env bash
# Quinn Comendant <quinn@strangecode.com>
# https://gist.github.com/quinncomendant/3be731567e529415d5ee
# Since 25 Jan 2015
# Version 1.1
CMD=$1;
if [[ `id -u` = 0 ]]; then
import Sortable from 'sortablejs';
export default {
bind() {
var self = this;
Sortable.create(this.el, {
animation: 150,
dataIdAttr: 'data-id',
codecov:
token: uuid # Your private repository token
url: "http" # for Codecov Enterprise customers
slug: "owner/repo" # for Codecov Enterprise customers
branch: master # override the default branch
bot: username # set user whom will be the consumer of oauth requests
ci: # Custom CI domains if Codecov does not identify them automatically
- ci.domain.com
- !provider # ignore these providers when checking if CI passed
# ex. You may test on Travis, Circle, and AppVeyor, but only need

Gpio interrupt callbacks in Node.js

When using the C++ Gpio method isr or the C function mraa_gpio_isr it's important to know that the passed in function will be called in the context of a low level interrupt.

As such it should be coded very carefully, and typically do as little as possible, in order not to interfere with the environment that has been interrupted.

When using the isr method in Javascript do we have to worry about this kind of thing?

The answer is no, as the logic for the Javascript wrappers ensures that the callback function passed to isr is invoked from the normal Node.js event loop.