Skip to content

Instantly share code, notes, and snippets.

View mika76's full-sized avatar
🤖
Coding...

Mladen Mihajlović mika76

🤖
Coding...
  • Serbia
  • 13:48 (UTC +02:00)
View GitHub Profile
@mika76
mika76 / Diff.cs
Created February 3, 2014 08:29 — forked from TaoK/Diff.cs
// Copyright (c) 2006, 2008 Tony Garnock-Jones <tonyg@lshift.net>
// Copyright (c) 2006, 2008 LShift Ltd. <query@lshift.net>
//
// 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 copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
/* This is how I am globally handling fatal exceptions thrown from Rx subscribers.
* It is what I came up with in response to my stackoverflow question here
* http://stackoverflow.com/questions/7210051/catching-exceptions-which-may-be-thrown-from-a-subscription-onnext-action
* This is far from ideal. From what I understand, exception handling has been improved greately in Rx for .NET 4.5
*/
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@mika76
mika76 / tfs_changelog.linq.cs
Last active August 29, 2015 14:07
TFS Changeset list
// Easiest in Linqpad
// Add References:
//Microsoft.TeamFoundation.Client
//Microsoft.TeamFoundation.Common
//Microsoft.TeamFoundation.VersionControl.Client
//Microsoft.TeamFoundation.WorkItemTracking.Client
// Merged some stuff from http://pascallaurin42.blogspot.com/2012/07/tfs-queries-generating-changelog-from.html
// and http://stackoverflow.com/questions/8429040/tfs-2010-how-to-produce-a-changelog-ie-list-of-work-items-between-two-releas
var tfsServer = new Uri("http://127.0.0.1:8080/tfs");
var branch = "$/Some Project";
var fromVersion = new ChangesetVersionSpec(1);
var toVersion = VersionSpec.Latest;
var tfs = TfsTeamProjectCollectionFactory
.GetTeamProjectCollection(tfsServer);
tfs.EnsureAuthenticated();
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst 1password
cinst 7zip
cinst 7zip.install
cinst AdobeAIR
cinst adobereader
cinst Atom
cinst markdownpad2

Mac OSX Spotlight Enhancement

Add this to Info.plist in /System/Library/Spotlight/RichText.mdimporter/Contents/ and Spotlight will search for source code files.

<string>public.c-header</string>
<string>public.c-plus-plus-header</string>
<string>public.c-source</string>
<string>public.objective-c-source</string>
public.c-plus-plus-source
@mika76
mika76 / gist:275f2cac9b856a2b0b7c
Created March 13, 2015 12:06
C3.JS Knockout bindings
ko.bindingHandlers.chartColumns = {
init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
var columns = ko.unwrap(valueAccessor()),
options = ko.unwrap(allBindings.get('chartOptions')) || {};
options = $.extend(true, options, {
bindto: element,
data: {
columns: columns
}
@mika76
mika76 / gist:691a32cb6a4711f6390f
Last active August 29, 2015 14:17
Knockout custom binding for jQuery Knob http://anthonyterrien.com/knob/
// https://github.com/aterrien/jQuery-Knob/issues/209
ko.bindingHandlers.knob = {
init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
var local = ko.utils.unwrapObservable(valueAccessor()),
options = {};
ko.utils.extend(options, ko.bindingHandlers.knob.options);
ko.utils.extend(options, allBindings.get('knobOptions'));
$(element)
//
// BitwiseOptions.swift
//
// Created by Gregory Higley on 11/24/14.
// Copyright (c) 2014 Prosumma LLC. All rights reserved.
//
// 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 UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class EditorWindowExample : EditorWindow
{
List<Node> nodes = new List<Node> ();