This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro_rules! string_value_type { | |
($TypeName:ident $(~$derive_name:ident)*) => { | |
#[derive($($derive_name),*)] | |
pub struct $TypeName(String); | |
impl From<&str> for $TypeName { | |
fn from(value: &str) -> Self { | |
Self(value.to_owned()) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
processors: | |
attributes/env: | |
actions: | |
- key: deployment.environment | |
value: production | |
action: insert | |
service: | |
pipelines: | |
traces: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <set> | |
#include <memory> | |
#include <vector> | |
template <typename T> | |
class IObservable; | |
template <typename T> | |
class IObserver | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fails to compile in vs | |
using ErrorPair = struct ErrorPairStruct | |
{ | |
int id; | |
std::string message; | |
} | |
using ExceptionErrorMap = std::map <ExceptionType, ErrorPair>; | |
const ExceptionErrorMap errorsMap { | |
{ NotFoundException, { IDS_NOT_FOUND, Lookup(IDS_NOT_FOUND) } }, | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import glob | |
import os.path | |
import os | |
import argparse | |
import csv | |
def usage(args): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--delim", "-d", default="|") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Bounce2.h" | |
#include "Servo.h" | |
#define SERVO_PIN 9 | |
#define READY_PIN 13 | |
#define ARM_PIN 12 | |
#define SERVO_READY 0 | |
#define SERVO_DEPLOY 180 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%version 1 | |
%numleds 5 | |
%require imu | |
%green RGB(0,128,0) | |
%red RGB(128,0,0) | |
states { | |
state foo { | |
skipif imu.accel.x > 1 | |
setall %green |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
BASE=${0%/*} | |
SQLITE=/usr/bin/sqlite3 | |
echo "Extracting from OmniFocus" | |
$BASE/of-store --debug --out=$BASE/finished.db | |
$BASE/kanban-fetch --debug --out=$BASE/inprogress.db | |
echo "Exporting to tasks.csv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
BASE=${0%/*} | |
SQLITE=/usr/bin/sqlite3 | |
echo "Extracting from OmniFocus" | |
$BASE/of-store --debug --out=$BASE/finished.db | |
echo "Exporting to tasks.csv" | |
$SQLITE $BASE/finished.db <<! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code by @MetaGlitch | |
float fps = 16.666; | |
int inFrames = 15; | |
int outFrames = 15; | |
int otherFrames = 60; | |
int numFrames = inFrames + otherFrames + outFrames; | |
float t1 = inFrames * 1.0/numFrames; |
NewerOlder