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
:: you must have oggenc or lame codecs installed and available in your PATH | |
cd path/to/your/folder/of/wav/files/to/convert | |
:: replace BITRATE with what you need, and use either of the following lines: | |
for /F %v IN ('dir /b *.wav') DO oggenc -m BITRATE %v | |
for /F %v IN ('dir /b *.wav') DO lame -b BITRATE %v |
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
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0 |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
public static class ListShuffle | |
{ | |
public static void Shuffle<T>(this IList<T> list) | |
{ | |
Random rand = new Random(); |
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
void str_append_from(char *original, int &idx, const char *append) { | |
while (*append) { | |
original[idx++] = *append++; | |
} | |
original[idx] = 0; | |
} |
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
using UnityEngine; | |
using System.Collections; | |
public class Mobilephonizer : MonoBehaviour | |
{ | |
public AudioClip clip; | |
[RangeAttribute(0,20000)] | |
public int lowFrequencyCutoff = 1000; | |
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
/* | |
|| | |
|| @author Alexander Brevig <[email protected]> | |
|| @url http://wiring.org.co/ | |
|| @contribution Brett Hagman <[email protected]> | |
|| @contribution Hernando Barragan <[email protected]> | |
|| | |
|| @description | |
|| | A public field wrapper for providing assignment safe guards | |
|| # |
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
class PropertyTester { | |
public: | |
PropertyTester() | |
: threshold() | |
, increment(PropertyTester::incrementAssignSafetyGuard) | |
, isIncrementing(_isIncrementing) { | |
_isIncrementing = true; | |
} | |
Property<int> threshold; | |
ConstrainedProperty<int> increment; |
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
/* | |
BEAT BLINKER | |
Simple demo of how to use two processing units | |
to implement a 'used to be' hard problem | |
*/ | |
Microphone mic = Microphone(2, 8000); //pin 2 samplerate 8000 ? | |
Filter lowPass = LowPassFilter(100); | |
Threshold threshold = Threshold(50); //50% | |
LED beatBlinker = LED(WLED); |
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
using Microsoft.IdentityModel.Protocols.WSTrust; | |
using Microsoft.IdentityModel.Protocols.WSTrust.Bindings; | |
using System.ServiceModel; | |
using System.ServiceModel.Security; | |
using System.IdentityModel.Tokens; | |
string stsEndpoint = "https://YOURURL.com/adfs/services/trust/13/usernamemixed"; | |
string relyingPartyUri = "https://attensi.com"; | |
WSTrustChannelFactory factory = new WSTrustChannelFactory( |
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
const int NUMBER_OF_ZONES = 19; | |
const int DOOR_OPEN_MS = 5 * 1000; // 5 seconds | |
const int ZONE_ON_MS = 10 * 60 * 1000; // 10 minutes | |
unsigned int zoneLastOn[NUMBER_OF_ZONES] = {}; | |
void loop() { | |
//this is the multitasking part | |
//we just check the time that has passed since | |
//we last wanted it on and act accordingly |
OlderNewer