Skip to content

Instantly share code, notes, and snippets.

View windy1's full-sized avatar
💭
Why do booleans make good finger food? Because they're only a byte 😂

Walker Crouse windy1

💭
Why do booleans make good finger food? Because they're only a byte 😂
View GitHub Profile
This file has been truncated, but you can view the full file.
Testing started at 11:06 AM ...
> Task :buildSrc:compileJava NO-SOURCE
> Task :buildSrc:compileGroovy UP-TO-DATE
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:jar UP-TO-DATE
> Task :buildSrc:assemble UP-TO-DATE
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:processTestResources NO-SOURCE
const assert = require('assert');
describe('typeof', () => {
it('arrays are objects', () => {
assert(typeof [] === 'object');
});
it('objects are objects', () => {
assert(typeof {} === 'object');
});
provider "aws" {
region = var.region
version = "0.0"
}
resource "aws_instance" "main" {
count = var.instance_count
ami = "ami-04b9e92b5572fa0d1"
instance_type = var.instance_type
subnet_id = aws_subnet.main.id
@windy1
windy1 / main.tf
Last active December 20, 2019 19:38
Example / Use case for AWS Multicast over Transit Gateways
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
tags = {
Name = "Multicast_01"
}
}
#include <cstdlib>
#include <iostream>
#include <cassert>
#include "record.h"
using namespace std;
// Reference: http://www.portaudio.com/docs/v19-doxydocs/paex__record_8c_source.html
namespace sb {
static InternalCallback *callback; // set internally
static void myCallback(); // called by external library
void doStuff() {
// ...
external_library_set_callback(myCallback()); // never calls myCallback (when forward-declared)
}
static void myCallback() {
#include <cstdlib>
#include <iostream>
#include <cassert>
#include "record.h"
using namespace std;
// Reference: http://www.portaudio.com/docs/v19-doxydocs/paex__record_8c_source.html
namespace sb {
#define MAX_SECONDS 5
#define NUM_CHANNELS 2
#define SAMPLE_RATE 44100
#define FRAMES_PER_BUFFER 512
#define SAMPLE_SILENCE 0
#define SAMPLE_FORMAT /*paInt16*/ paInt8
#define ENCODING "LINEAR16"
#define LANGUAGE_CODE "en-US"
void onFinish(SomeData *data) {
callback(data);
if (data->myData) {
// "pointer being freed was not allocated"
// debugger says address is different from before callback
free(data->myData);
}
}
void callback(SomeData *data) {
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven {
name 'sponge-repo'
url 'https://repo.spongepowered.org/maven'
}
}
dependencies {