Skip to content

Instantly share code, notes, and snippets.

View madc's full-sized avatar

Matthias Esterl madc

View GitHub Profile
/*
DISCLAIMER: Use at your own risk!
Discussion: https://github.com/directus/directus/discussions/18297#discussioncomment-5695833
Based on: https://gist.github.com/lukas-schaetzle/f93eff3d961ac595d0e1ab4be5f34536
Tested with Directus 10.11.2 and PostgreSQL
This will delete all flow execution logs, revisions and acitivites which are older
than the specified MinTimestamp and are not in the top <specified MinItems> latest
/** Automate Slack invitations
* See https://github.com/ErikKalkoken/slackApiDoc/blob/master/users.admin.invite.md
*/
const inviteToSlack =
(token, email) => new Promise((resolve, reject) => {
const data = querystring.stringify({
resend: true,
token,
email,
});
### Keybase proof
I hereby claim:
* I am madc on github.
* I am matthiasesterl (https://keybase.io/matthiasesterl) on keybase.
* I have a public key ASBTMaDljXoVLqcbVm_Z-UmmZpVchjmkVZh1ayFXr4XdHAo
To claim this, I am signing this object:
# Maintainer: Francisco Martinez <zomernifalt at gmail dot com>
pkgname=makerbot-desktop
pkgver=3.8.0
_openmeshver=3.2_3.2
pkgrel=2
pkgdesc="A complete, free 3D printing solution for discovering, managing, and sharing your 3D prints."
arch=('x86_64')
url="https://www.makerbot.com/desktop"
license=('GPL')
depends=('boost' 'glibc>=2.4' 'hicolor-icon-theme' 'libdbus>=1.0.2' 'libgl' 'qt5-base>=5.3.0' 'qt5-webkit>=5.0.2' 'zenity' 'zlib>=1.1.4')
@madc
madc / archive
Created October 19, 2015 22:06
A little helper script to archive a BoltCMS installation
#!/usr/bin/env bash
# A little helper script to archive a BoltCMS installation
# Usage:
# Default behaviour:
# $ ./archive
# Restore:
# $ ./archive --restore <archive>
if [ $1 ] && [ $2 ]; then
@madc
madc / PKGBUILD
Created September 1, 2015 21:18
PKGBUILD for jsoncpp 0.6.0rc2
pkgname=jsoncpp
pkgver=0.6.0rc2
_pkgver=0.6.0-rc2
pkgrel=1
pkgdesc='A C++ library for interacting with JSON'
url='https://github.com/open-source-parsers/jsoncpp'
license=('MIT' 'custom:Public_Domain')
arch=('i686' 'x86_64')
depends=('gcc-libs')
makedepends=('scons')
@madc
madc / mine.ino
Created March 15, 2015 15:59
Arduino code for the Goldeneye 007 Remote Mine Prop (http://www.thingiverse.com/make:125687)
#include "pitches.h"
const int pinButton = 2;
const int pinSpeaker = 4;
const int pinLED[] = {3, 5, 6, 9, 10, 11};
boolean running = false;
volatile int mode = 0;
volatile unsigned long button_pressed = 0;
#include <IRremote.h>
/*
Send infrared commands from the Arduino to the iRobot Roomba
by probono
2013-03-17 Initial release
@madc
madc / testApp.cpp
Created August 27, 2013 20:27
Draw the current frame rate on the screen.
void testApp::draw(){
ofSetColor(0);
ofDrawBitmapString("FPS: " + ofToString((int)ofGetFrameRate()), 20, 20);
// [...]
}
@madc
madc / threadedCam.h
Created August 17, 2013 14:30
Import a picture from cam to ofImage when using a separate thread. (openFrameworks) Example: http://github.com/wirbrennen/ofxDocuApp
#ifndef _THREADED_CAM
#define _THREADED_CAM
#include "ofMain.h"
class threadedCam : public ofThread{
public:
ofVideoGrabber vidGrabber;
ofImage exportImage;