Skip to content

Instantly share code, notes, and snippets.

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
View log.txt
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
View types.spec.js
const assert = require('assert');
describe('typeof', () => {
it('arrays are objects', () => {
assert(typeof [] === 'object');
});
it('objects are objects', () => {
assert(typeof {} === 'object');
});
View main.tf
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 Dec 20, 2019
Example / Use case for AWS Multicast over Transit Gateways
View main.tf
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
tags = {
Name = "Multicast_01"
}
}
View record.cpp
#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 {
View example.cpp
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() {
View record.cpp
#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 {
View record.cpp
#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"
View example.cpp
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) {
View build.gradle
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven {
name 'sponge-repo'
url 'https://repo.spongepowered.org/maven'
}
}
dependencies {
You can’t perform that action at this time.