Skip to content

Instantly share code, notes, and snippets.

View NVentimiglia's full-sized avatar

Nicholas Ventimiglia NVentimiglia

View GitHub Profile
@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 / 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
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": {
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace TCPServer
{
public class Program
{
private static bool running = true;
{
"version": "1.0.0-*",
"authors": [ "Nicholas Ventimiglia" ],
"title": "Signal Message Queue",
"description": "High fidelity networking : UDP / TCP / WS with Binary messages",
"copyright": "http://nicholasventimiglia.com",
"buildOptions": {
"allowUnsafe": true,
"emitEntryPoint": true
using System;
using SignalMQ.Data;
using System.Threading.Tasks;
using LiteNetLib;
using LiteNetLib.Utils;
namespace SignalMQ.Transports.Udp
{
/// <summary>
/// A tcp connection