Skip to content

Instantly share code, notes, and snippets.

@alexcmd
alexcmd / DynamicXMLNode.cs
Last active September 19, 2016 14:19
Work with XML ExtendedObject
// Create
//dynamic contact = new DynamicXMLNode("Contacts");
//contact.Name = "Patrick Hines";
//contact.Phone = "206-555-0144";
//contact.Address = new DynamicXMLNode();
//contact.Address.Street = "123 Main St";
//contact.Address.City = "Mercer Island";
//contact.Address.State = "WA";
//contact.Address.Postal = "68402";
//
@alexcmd
alexcmd / MeshCut.cs
Created December 29, 2015 08:29
Mesh cut algorithm for Unity
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class MeshCut
{
private static Plane blade;
private static Transform victim_transform;
private static Mesh victim_mesh;
/* MPU9250 Basic Example Code
by: Kris Winer
date: April 1, 2014
license: Beerware - Use this code however you'd like. If you
find it useful you can buy me a beer some time.
Demonstrate basic MPU-9250 functionality including parameterizing the register addresses, initializing the sensor,
getting properly scaled accelerometer, gyroscope, and magnetometer data out. Added //display functions to
allow //display to on breadboard monitor. Addition of 9 DoF sensor fusion using open source Madgwick and
Mahony filter algorithms. Sketch runs on the 3.3 V 8 MHz Pro Mini and the Teensy 3.1.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Speech.Recognition;
quaetrix analytics
software research, education, and technical content development
using System;
// For 2014 Microsoft Build Conference attendees
// April 2-4, 2014
// San Francisco, CA
//
// This is source for a C# console application.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Speech.Recognition;
function getAllEvents(element) {
var result = [];
for (var key in element) {
if (key.indexOf('on') === 0) {
result.push(key.slice(2));
}
}
return result.join(' ');
}
#GET
Get-WindowsFeature | ? { $_.Installed -AND $_.SubFeatures.Count -eq 0 } | Export-Clixml ServerFeatures.xml
#Set
$ServerFeatures = Import-Clixml ServerFeatures.xml
foreach ($feature in $ServerFeatures) {Install-WindowsFeature -Name $feature.name}
@alexcmd
alexcmd / libjitsi_bundle_streams.java
Created September 13, 2016 16:52 — forked from Haerezis/libjitsi_bundle_streams.java
An example to show how to bundle RTP streams with ice4j and libjitsi
LibJitsi.start();
MediaService mediaService = LibJitsi.getMediaService();
//I assume that I have a working video and audio MediaDevice
MediaDevice randomVideoDevice = createVideoDevice();
MediaDevice randomAudioDevice = createAudioDevice();
//I create the MediaFormat for each stream
MediaFormat videoFormat
@alexcmd
alexcmd / MeshSplinesAndExtrusion.cs
Created September 18, 2016 17:01 — forked from unitycoder/MeshSplinesAndExtrusion.cs
Snippets : Unite 2015 - A coder's guide to spline-based procedural geometry
/* Code snippets from Unite 2015 - A coder's guide to spline-based procedural geometry */
/* https://www.youtube.com/watch?v=o9RK6O2kOKo */
// Optimized GetPoint
Vector3 GetPoint( Vector3[] pts, float t ) {
float omt = 1f-t;
float omt2 = omt * omt;
float t2 = t * t;
return pts[0] * ( omt2 * omt ) +
pts[1] * ( 3f * omt2 * t ) +