Skip to content

Instantly share code, notes, and snippets.

View NVentimiglia's full-sized avatar

Nicholas Ventimiglia NVentimiglia

View GitHub Profile
using System;
using System.Net.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace System.Net.Sockets
{
public class WebSocketWrapper : IDisposable
{
@NVentimiglia
NVentimiglia / gist:81923dfea51edcaa91fb
Created June 3, 2015 04:22
Boostrap dropdown proxy plugin. Link a bootstrap dropdown selection to a hidden form element.
Do <select>'s drive you crazy ? Want to use a bootstrap dropdown in your forms? now you can.
This plugin works by binding the dropdown to a hidden form element.
// HTML
<div class="navbar-right navbar-collapse collapse" id="navbar-collapse2">
<ul class="nav navbar-nav">
<li class="form-groupdropdown proxy-select" data-target="#Role2">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">All Catalogs</a>
<ul class="dropdown-menu" role="menu">
<li><a href="#" value="0">All Catalogs</a></li>
using System;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using Android.Graphics;
using Xamarin.Forms;
using Color = Xamarin.Forms.Color;
using Path = System.IO.Path;
namespace Ventimiglia.Controls
@NVentimiglia
NVentimiglia / ItemStack.cs
Last active October 31, 2021 21:06
Need a Items control or a repeater for Xamarin ? Here you go. Bind to observable collections, define your data template and enjoy.
// MIT License
// Nicholas Ventimiglia
// 2016-9-19
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
@NVentimiglia
NVentimiglia / RadialLayout.cs
Last active September 21, 2015 17:16 — forked from DGoodayle/RadialLayout.cs
Radial Layouts in Unity
using UnityEngine;
using UnityEngine.UI;
/*
Radial Layout Group by Just a Pixel (Danny Goodayle) - http://www.justapixel.co.uk
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@NVentimiglia
NVentimiglia / SyncTransform.cs
Created January 24, 2016 15:49
Butter smooth Unity3D Sync Transform
public class SyncTransform : SyncComponenent
{
/// <summary>
/// Sync Update order
/// </summary>
public int UpdateOrder = 0;
[Range(0, 2)]
public float Smoothness = 1f;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Fleck;
namespace FleckDemo.Controllers
{
public class WSDemo : IDisposable
public static class LeakTracker
{
static List<WeakReference> _tracker = new List<WeakReference>();
/// <summary>
/// should be called only at object construction/instantiation
/// </summary>
public static void Add(object objToTrack)
{
Prune();
@NVentimiglia
NVentimiglia / 1 Parent Page
Last active April 6, 2016 04:31
Tok.Xamarin Custom Render
<ContentPage.Content>
<Grid x:Name="MainGrid" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<Grid x:Name="videoContainer" />
<!-- Video controll added into the video container. Bunch of Forms buttons and stuf below...-->
{
"title": "Signaling Server Demo",
"copyright": "http://NicholasVentimiglia.com",
"description": "Signaling Server Demo",
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {