Skip to content

Instantly share code, notes, and snippets.

@wesen
wesen / hello-world.cpp
Last active February 21, 2017 20:04
Gist created by fiddle.jyt.io
class I_A {
public:
virtual void func1() = 0;
};
class C_A : public I_A {
public:
C_A() { }
#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) {
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.
Clear[nestPimp2];
Options[nestPimp2] = Join[
{
PimpFunction -> Identity,
PostPimpFunction -> Identity,
PrePimpFunction -> Identity,
InnerPimpFunction -> Identity
},
Options[ImageRestyle]
];
@wesen
wesen / spi_xfer.c
Last active December 30, 2017 23:27 — forked from C47D/spi_xfer.c
test to send an array of uint8_t's via SPI using both polling and interrupts
#include "project.h"
#include <string.h>
enum {
MAX_ITEMS = 10,
};
ring_buffer_t rx_buffer;
ring_buffer_t tx_buffer;
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"
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VolumeFader : MonoBehaviour {
private AudioSource _as;
private float _originalVolume;
private IEnumerator _fadeCoroutine;
void Start() {

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:

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,
#! /usr/bin/env python
import re
import tempfile
import os, getopt, sys, shutil
import traceback
from os.path import splitext, basename
class TxtFile:
def __init__(self, title, author = None, style = None, includeToc = None):