Skip to content

Instantly share code, notes, and snippets.

Bogdan Rădulescu bogdanr

Block or report user

Report or block bogdanr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@SyncChannel
SyncChannel / Arduino_Speed_Tests.ino
Created Jan 30, 2016
Arduino Speed Test Benchmarking Program
View Arduino_Speed_Tests.ino
// Arduino Speed Test Benchmarking Program
// Original Program Credit: Arduino.cc
// Modified By: Dan Watson
// synchannel.blogspot.com
// 1-29-2015
// This sketch is the speed test portion of the Arduino Show Info program
// http://playground.arduino.cc/Main/ShowInfo
// Certain tests may not compile/run for all boards. Comment them out as necessary:
View ESP_I2S_Client.ino
/*
ffmpeg -i "$file" -f s32be -acodec pcm_s32be -ar 44100 -af "volume=0.5" tcp://espip:5522
*/
#include "i2s.h"
#include <ESP8266WiFi.h>
const char* ssid = "***********";
const char* password = "**********";
WiFiServer pcmServer(5522);
static WiFiClient pcmClient;
View cloudtrail.conf
input {
s3 {
bucket => "your_bucket_name"
credentials => ["acces_key","secret_key"]
codec => cloudtrail
region_endpoint => "your_region"
type => "cloudtrail"
prefix => "your/logs/path"
sincedb_path => "/path/.sincedb"
}
@projectgus
projectgus / linpack_bench.ino
Last active Oct 17, 2019
Linpack Floating Point benchmark that runs as an Arduino sketch. (Yes, I know...) I wanted to generically measure Arduino Floating Point performance, this seemed like a reasonable(ish) way to do it. Runs with N=10, single precision, but produces sane looking results & residual. (89 Linpack kFLOPS on a Freetronics Eleven, ie Arduino Uno compatibl…
View linpack_bench.ino
# include <stdlib.h>
# include <stdio.h>
# include <math.h>
int do_benchmark ( void );
double cpu_time ( void );
void daxpy ( int n, double da, double dx[], int incx, double dy[], int incy );
double ddot ( int n, double dx[], int incx, double dy[], int incy );
int dgefa ( double a[], int lda, int n, int ipvt[] );
void dgesl ( double a[], int lda, int n, int ipvt[], double b[], int job );
@joeyAghion
joeyAghion / mongodb_collection_sizes.js
Last active Jan 14, 2020
List mongodb collections in descending order of size. Helpful for finding largest collections. First number is "size," second is "storageSize."
View mongodb_collection_sizes.js
var collectionNames = db.getCollectionNames(), stats = [];
collectionNames.forEach(function (n) { stats.push(db[n].stats()); });
stats = stats.sort(function(a, b) { return b['size'] - a['size']; });
for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); }
@deltheil
deltheil / nginx.conf
Created Jun 4, 2012
Hide sensitive GET parameters within nginx access logs thanks to the Lua module
View nginx.conf
http {
log_format filt '$remote_addr - $remote_user [$time_local] "$_request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
server {
location /login {
# `set` is provided by the Rewrite module
set $filter "password|secret";
You can’t perform that action at this time.