Skip to content

Instantly share code, notes, and snippets.

View midi-mix.py
import drawSvg as draw
d = draw.Drawing(254, 203, origin=(-10, -10), displayInline=False)
# Draw a rectangle
rec_height = 120
rec_width = 232
stroke_width = 0.2
d.append(draw.Rectangle(0, 0, rec_width, rec_height,
View keybase.md

Keybase proof

I hereby claim:

  • I am wesen on github.
  • I am wesen3000 (https://keybase.io/wesen3000) on keybase.
  • I have a public key ASCdTn5Srg9uHm4AqYL9Dva42MrSsorzgxH14P6BfG3r6Ao

To claim this, I am signing this object:

View VolumeFader.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VolumeFader : MonoBehaviour {
private AudioSource _as;
private float _originalVolume;
private IEnumerator _fadeCoroutine;
void Start() {
View gist:a0ee2892a094a859a43d285eb734bc7f
DESCRIPTION = "uavcan library"
HOMEPAGE = "https://pypi.python.org/pypi/uavcan"
LICENSE = "MIT"
PV = "1.0.0-formlabs-31"
LIC_FILES_CHKSUM = "file://LICENSE;md5=0249574e7552cd65846752d7e94660b9"
SRC_URI = "gitsm://git@github.com/Formlabs/pyuavcan.git;protocol=ssh;branch=master"
SRCREV = "3eab1f1703682a0399b46365e7316f4b520a9c4e"
@wesen
wesen / spi_xfer.c
Last active Dec 30, 2017 — forked from C47D/spi_xfer.c
test to send an array of uint8_t's via SPI using both polling and interrupts
View spi_xfer.c
#include "project.h"
#include <string.h>
enum {
MAX_ITEMS = 10,
};
ring_buffer_t rx_buffer;
ring_buffer_t tx_buffer;
View wolfie-restyle.ma
Clear[nestPimp2];
Options[nestPimp2] = Join[
{
PimpFunction -> Identity,
PostPimpFunction -> Identity,
PrePimpFunction -> Identity,
InnerPimpFunction -> Identity
},
Options[ImageRestyle]
];
View qt5-glyphnode-patch
commit b4c6d6083b67a00863f8243330687e8c20407257 (HEAD)
Author: Alexandru Croitor <alexandru.croitor@qt.io>
Date: 10 months ago
Check qgl_current_fbo_invalid before using qgl_current_fbo
QSG24BitTextMaskShader::useSRGB() on macOS accesses the current context
qgl_current_fbo member without first checking if it is valid.
Make sure it also checks qgl_current_fbo_invalid, thus not accidentally
dereferencing a dangling pointer.
View encoderloop.cpp
#include <inttypes.h>
#include <Encoder.h>
const int ShiftPin = 0; // This is the button to activate Alternate action for buttons and 8 first encoders
const int ledPin = 32; // This LED when HIGH shows the Shift Button is pressed
struct EncoderValue {
EncoderValue(uint8_t ccParameter) :
value(0)
, ccParameter(ccParameter) {
@wesen
wesen / hello-world.cpp
Last active Feb 21, 2017
Gist created by fiddle.jyt.io
View hello-world.cpp
class I_A {
public:
virtual void func1() = 0;
};
class C_A : public I_A {
public:
C_A() { }
View tries.rs
pub fn new() -> Trie {
let mut t = Trie {
children: Vec::with_capacity(26),
// children: vec![None; 26],
cnt: 0,
children_cnt: 0
};
for _ in 0..26 {
t.children.push(None);
}