This file contains 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 <windows.h> | |
#include <stdio.h> | |
#include <assert.h> | |
#include <mmreg.h> | |
#include <msacm.h> | |
#define MP3_BLOCK_SIZE 522 | |
#define SOURCE_MP3 "C:\\audiograbber\\At The Club Last Night\\At_The_Club_Last_Night_-_Haven't_You_Heard.mp3" | |
#define OUTPUT_PCM_FILE "c:\\dump.pcm" |
This file contains 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
ColorMatrixColorFilter setContrast(float contrast) { | |
float scale = contrast + 1.f; | |
float translate = (-.5f * scale + .5f) * 255.f; | |
float[] array = new float[] { | |
scale, 0, 0, 0, translate, | |
0, scale, 0, 0, translate, | |
0, 0, scale, 0, translate, | |
0, 0, 0, 1, 0}; | |
ColorMatrix matrix = new ColorMatrix(array); | |
ColorMatrixColorFilter filter = new ColorMatrixColorFilter(matrix); |
This file contains 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
// | |
// Java wrapper for FFTW3 using Java Native Access (JNA) | |
// Author: Kipton Barros | |
// | |
package fftw3; | |
// This file was automatically generated with JNAerator the command: | |
// java -jar jnaerator-0.9.7.jar -library FFTW3 /usr/local/include/fftw3.h -o . -v -noJar -noComp -noPrimitiveArrays -noMangling -structsInLibrary -runtime JNA -sizeAsLong -Dfftw_complex=double -Dfftwf_complex=float | |
// I made some small manual modifications, essentially to remove unneeded JNAerator dependencies |
This file contains 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
/* | |
readmp3.c | |
Copyright (c) 2012, Jeremiah LaRocco jeremiah.larocco@gmail.com | |
Permission to use, copy, modify, and/or distribute this software for any | |
purpose with or without fee is hereby granted, provided that the above | |
copyright notice and this permission notice appear in all copies. | |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
This file contains 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 <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#define BUF_SIZE 5 | |
// the buffer works like a stack for | |
// the sake of simplicity, if needed | |
// we may implement a queue |
This file contains 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
package us.eharning.android.cryptosample; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.security.GeneralSecurityException; | |
import java.security.SecureRandom; | |
import java.security.spec.AlgorithmParameterSpec; | |
import java.security.spec.KeySpec; |
This file contains 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 bash | |
rm -rf "${HOME}/Library/Caches/CocoaPods" | |
rm -rf "`pwd`/Pods/" | |
pod update |
This file contains 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
#!/bin/sh | |
# this hook is in SCM so that it can be shared | |
# to install it, create a symbolic link in the projects .git/hooks folder | |
# | |
# i.e. - from the .git/hooks directory, run | |
# $ ln -s ../../git-hooks/pre-commit.sh pre-commit | |
# | |
# to skip the tests, run with the --no-verify argument | |
# i.e. - $ 'git commit --no-verify' |
This file contains 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 node | |
// M3U8 Downloader (not working) | |
var fs = require('fs'); | |
var http = require('http'); | |
var https = require('https'); | |
var crypto = require('crypto'); | |
var program = require('commander'); | |
var ee = require('streamee'); |
This file contains 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
if (!!root.EventSource) { | |
/** | |
* This method wraps an EventSource as an observable sequence. | |
* @param {String} url The url of the server-side script. | |
* @param {Observer} [openObserver] An optional observer for the 'open' event for the server side event. | |
* @returns {Observable} An observable sequence which represents the data from a server-side event. | |
*/ | |
dom.fromEventSource = function (url, openObserver) { | |
return new AnonymousObservable(function (observer) { |
OlderNewer