Skip to content

Instantly share code, notes, and snippets.

// example about structures
// from http://www.cplusplus.com/doc/tutorial/structures/
#include <iostream>
#include <string>
#include <sstream>
using namespace std;

struct movies_t {
 string title;
{
"nombre": {
"actual": "Prado",
"original": "Margaritas",
"alias": "montañitas"
},
"fecha_origen_barrio": "",
"audio": {
"link": "http://freesound.org/people/Thoribass/sounds/251423/\n",
"grabado_por": "morfina_rec",
@son0p
son0p / ejemplo.json
Last active February 12, 2016 19:50
{
"nombre_actual": "Prado",
"nombre_original": "Las orquideas",
"fecha_origen_barrio": "",
"audio": "http://freesound.org/people/Thoribass/sounds/251423/",
"tags": "risas, buses, fiesta"
}
%> Chuck --loop
%> chuck = 2 foo.ck
%> chuck - 2 3 8
%> chuck ^
%> chuck --time
 %> chuck @192.168.1.1 + foo.ck bar.ck
    (or)
 %> chuck @foo.bar.com -p8888 + foo.ck bar.ck
@son0p
son0p / oneliners.py
Last active February 10, 2016 19:51
## Rsync
### verbose copy
rsync -av ~/projects/test /media/ff/3593-80E0/fede/projects/
## Find
### files by size
find ~/ -type f -size +2000000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
// get FFT spectrum
// calculate frequency (approx)
// first bin is DC (freq = 0Hz)
// make sure to filter out the DC (signal - mean(signal) => signal)
// also make sure to applying band-pass filter at Nyquist frequency
// Nyquist frequency == sampling rate / 2

// input signal
SinOsc g => FFT fft => blackhole;
// get FFT spectrum
// calculate frequency (approx)
// first bin is DC (freq = 0Hz)
// make sure to filter out the DC (signal - mean(signal) => signal)
// also make sure to applying band-pass filter at Nyquist frequency
// Nyquist frequency == sampling rate / 2

// Input signal
SinOsc g =&gt; FFT fft =&gt; blackhole;