Skip to content

Instantly share code, notes, and snippets.

💭

El Bruno elbruno

💭
Block or report user

Report or block elbruno

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
@elbruno
elbruno / ElBrunoWpfViewXboxOneController
Created Jun 27, 2014
El Bruno - WPF View display XBoxOne Controller state
View ElBrunoWpfViewXboxOneController
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Threading;
using SharpDX.XInput;
namespace ElBruno.GameController
{
public partial class MainWindow : INotifyPropertyChanged
@elbruno
elbruno / ElBrunoKW4V2Speech
Created Jul 2, 2014
El Bruno - Kinect V2 SDK Speech demo
View ElBrunoKW4V2Speech
private void WindowLoaded(object sender, RoutedEventArgs e)
{
kinectSensor = KinectSensor.GetDefault();
kinectSensor.Open();
var audioBeamList = kinectSensor.AudioSource.AudioBeams;
var audioStream = audioBeamList[0].OpenInputStream();
convertStream = new KinectAudioStream(audioStream);
Var ri = GetKinectRecognizer();
recognitionSpans = new List<Span> { forwardSpan, backSpan, rightSpan, leftSpan };
@elbruno
elbruno / ElBrunoJoystickCalculateDirections
Created Jul 5, 2014
El Bruno - XBoxOne Joystick Calculate Directions
View ElBrunoJoystickCalculateDirections
public static MoveDirections CalculateDirectionY(float y, int yCoeficient)
{
var locationY = MoveDirections.DownFar;
var currentLocationY = y * yCoeficient;
if (currentLocationY > 20000)
{
locationY = MoveDirections.UpFar;
}
else if (currentLocationY > 10000)
{
@elbruno
elbruno / ElBrunoXboxOneControllerProcessMovements
Created Jul 5, 2014
El Bruno - XboxOne Controller ProcessMovements for Rocket Launcher
View ElBrunoXboxOneControllerProcessMovements
private void ProcessMovements(MoveDirection moveDirection, bool fire)
{
switch (moveDirection.CombinedXy)
{
case MoveDirections.Center:
_rocket.StopMovements();
break;
case MoveDirections.Left:
case MoveDirections.LeftFar:
_rocket.MoveLeft();
@elbruno
elbruno / ElBrunoSignalRHtmlClientOnConnectedOnHubI
Last active Aug 29, 2015
El Bruno - SignalR, Html Client not raise OnConnected on Hub (I)
View ElBrunoSignalRHtmlClientOnConnectedOnHubI
public override System.Threading.Tasks.Task OnConnected()
{
// some weird stuff here
return base.OnConnected();
}
public void JoinToArea(string area)
{
Groups.Add(Context.ConnectionId, area);
}
@elbruno
elbruno / ElBrunoSignalRHtmlClientOnConnectedOnHubII
Last active Aug 29, 2015
ElBruno - SignalR Html Client OnConnected On Hub II
View ElBrunoSignalRHtmlClientOnConnectedOnHubII
<script type="text/javascript">
var hub;
$(window).ready(function () {
console.log("windows ready para SignalR");
hub = $.connection.SampleHub;
$.connection.hub.start().done(
function () {
var area = 'default';
console.log("hub started, area:" + area);
hub.server.JoinToArea(area);
@elbruno
elbruno / ElBrunoSignalRHtmlClientOnConnectedOnHubIII
Created Jul 25, 2014
ElBruno - SignalR Html Client On Connected On Hub III
View ElBrunoSignalRHtmlClientOnConnectedOnHubIII
<script type="text/javascript">
var hub;
$(window).ready(function () {
console.log("windows ready para SignalR");
hub = $.connection.SampleHub;
// dummy call to force the [OnConnected()] method on signalR hub
hub.client.foo = function () { };
$.connection.hub.start().done(
function () {
var area = 'default';
@elbruno
elbruno / ElBrunoConnectToPairedBlueToohDeviceUsingPIN
Last active Aug 29, 2015
El Bruno - Connect to paired BlueTooh Device using PIN
View ElBrunoConnectToPairedBlueToohDeviceUsingPIN
private static void Main()
{
BluetoothAddress arduinoAdress = null;
_blueToothClient = new BluetoothClient();
var devices = _blueToothClient.DiscoverDevices();
foreach (var device in devices.Where(device => device.DeviceName == "IoT Arduino - Mainframe Bridge"))
{
arduinoAdress = device.DeviceAddress;
Console.WriteLine("Device found, Address:" + arduinoAdress.ToString());
}
@elbruno
elbruno / PebbleCommunicationToSmartPhone02C
Created Oct 2, 2014
Pebble - Comunication between the pebble smartwatch and a smartphone
View PebbleCommunicationToSmartPhone02C
#include <pebble.h>
static Window *window;
static TextLayer *text_layer;
enum {
KEY_EXCHANGEDATA = 0,
};
// END Interaction with JS
@elbruno
elbruno / ElBrunoLealLetdemo
Created Dec 5, 2014
El Bruno LealLet demo
View ElBrunoLealLetdemo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>@ViewBag.Title</title>
@Styles.Render("~/Content/css")
</head>
<body>
<h2>El Bruno - LeafLet demo 01</h2>
You can’t perform that action at this time.