This file contains hidden or 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
// This example is based on the Gate operator from https://bitbucket.org/horizongir/bonsai | |
using System; | |
using System.Reactive; | |
using System.Reactive.Concurrency; | |
using System.Reactive.Linq; | |
using System.Reactive.Subjects; | |
namespace ConsoleApplication1 | |
{ |
This file contains hidden or 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; | |
public class StereoCamera | |
: MonoBehaviour | |
{ | |
public const float DefaultSeparation = 0.067f; | |
public const float MinSeparation = 0.01f; | |
public const float MaxSeparation = 0.10f; | |
public const float DefaultConvergence = 5.0f; | |
public const float MinConvergence = 0.01f; |
This file contains hidden or 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
public IObservable<float> GetSignalStrength() | |
{ | |
return Observable.Create<float>(observer => | |
{ | |
var centralManager = new CBCentralManager(DispatchQueue.CurrentQueue); | |
centralManager.DiscoveredPeripheral += (object sender, CBDiscoveredPeripheralEventArgs e) => | |
{ | |
observer.OnNext(e.RSSI.FloatValue); | |
}; |
This file contains hidden or 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; | |
public class IterationTest : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
const int count = 100000000; | |
int[] a = new int[count]; | |
int total; | |
var watch = new System.Diagnostics.Stopwatch(); |
This file contains hidden or 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
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin | |
cinst -y f.lux | |
cinst -y 7zip.install | |
cinst -y adobereader | |
cinst -y googlechrome | |
cinst -y notepadplusplus.install | |
cinst -y tailblazer | |
cinst -y vlc | |
cinst -y greenshot |
This file contains hidden or 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
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
This file contains hidden or 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 Splat; | |
using System; | |
using System.IO; | |
using System.Reactive.Concurrency; | |
using System.Reactive.Disposables; | |
using System.Reactive.Linq; | |
namespace SaveAllTheTime.Models | |
{ | |
interface IFilesystemWatchCache |
This file contains hidden or 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
MySmartEnum.First.Equals(MySmartEnum.First); // = true | |
MySmartEnum.First.Equals(MySmartEnum.Third); // = false | |
MySmartEnum.Third.Equals(MySmartEnum.AnotherThird); // = true |
This file contains hidden or 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
firewall { | |
all-ping enable | |
broadcast-ping disable | |
group { | |
network-group UDP_MULTICAST { | |
description "" | |
network 232.0.0.0/8 | |
network 235.0.0.0/8 | |
network 239.0.0.0/8 | |
} |
This file contains hidden or 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
public static partial class TypeExtensions | |
{ | |
public static string GetFriendlyName(this Type type) | |
{ | |
if (!type.IsGenericType) | |
return type.FullName; | |
var name = type.FullName.Substring(0, type.FullName.IndexOf('`')); | |
var fullName = new StringBuilder(name); | |
fullName.Append("<"); |
OlderNewer