This file contains hidden or 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
#pragma once | |
#include <JuceHeader.h> | |
/** | |
Silences the buffer if bad or loud values are detected in the output buffer. | |
Use this during debugging to avoid blowing out your eardrums on headphones. | |
If the output value is out of the range [-1, +1] it will be hard clipped. | |
*/ | |
inline void protectYourEars(float *buffer, int sampleCount) |
This file contains hidden or 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 that allows conversion of OpenSSL public keys into the juce::RSAKey format. | |
This may or may not work with private keys. | |
I have not tested it with private keys from the server, only public keys from the server. | |
*/ | |
struct PEMHelpers | |
{ | |
using PEMMemoryBlock = juce::MemoryBlock; | |
using PEMDataType = juce::uint8; | |
This file contains hidden or 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
/* | |
============================================================================== | |
MouseOverChecker.h | |
Created: 13 Aug 2019 1:26:42pm | |
Author: Daniel Walz | |
============================================================================== | |
*/ |
This file contains hidden or 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 <iostream> | |
#include <stdio.h> | |
#include <string.h> | |
#include <openssl/rsa.h> | |
#include <openssl/pem.h> | |
#include <openssl/err.h> | |
#define CRYPTO_RSA_KEY_LEN_4096 4096 | |
#define CRYPTO_RSA_KEY_LEN_2048 2048 | |
#define CRYPTO_RSA_KEY_LEN_1024 1024 |
This file contains hidden or 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
extern crate custom_error; | |
extern crate memmem; | |
extern crate openssl; | |
extern crate openssl_sys; | |
extern crate hex; | |
extern crate foreign_types_shared; | |
extern crate tokio; | |
extern crate tokio_openssl; |
This file contains hidden or 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
// Fast 1D convolution with AXV | |
// By Joannes Vermorel, Lokad, January 2018 | |
// Released under MIT license | |
#include <string.h> | |
#include <stdio.h> | |
#include <malloc.h> | |
/* A simple implementation of a 1D convolution that just iterates over | |
* scalar values of the input array. |
This file contains hidden or 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
cmake_minimum_required(VERSION 2.8) | |
include(ExternalProject) | |
ExternalProject_Add(sqlite-sources | |
URL http://www.sqlite.org/2017/sqlite-src-3200100.zip | |
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/sqlite-sources | |
CONFIGURE_COMMAND cd ../sqlite-sources && ./configure | |
BUILD_COMMAND "" | |
INSTALL_COMMAND "") |
This file contains hidden or 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
use std::net; | |
use std::env; | |
fn listen(socket: &net::UdpSocket, mut buffer: &mut [u8]) -> usize { | |
let (number_of_bytes, src_addr) = socket.recv_from(&mut buffer).expect("no data received"); | |
println!("{:?}", number_of_bytes); | |
println!("{:?}", src_addr); |
This file contains hidden or 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 | |
autoload -U zmv | |
# Safety first: Always use -n switch to test changes before commit. | |
# Clean up file names in subdirectories and remove special characters | |
zmv -n '(**/)(*)' '$1${2//[^A-Za-z0-9.-]/_}' | |
# Replace spaces in filenames and folders with a hyphen | |
zmv -n '* *' '$f:gs/ /-' |
This file contains hidden or 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
export const reactNativeHttpClient = { | |
// implment an execute function | |
execute: async function (obj) { | |
const httpMethod = obj.method; | |
const requestHeaders = obj.headers; | |
const body = obj.body; | |
const url = obj.url; | |
const response = await fetch(obj.url, { | |
method: httpMethod, |
NewerOlder