Skip to content

Instantly share code, notes, and snippets.

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

Mladen Mihajlović mika76

🤖
Coding...
  • Serbia
  • 06:22 (UTC +02:00)
View GitHub Profile
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class EditorWindowExample : EditorWindow
{
List<Node> nodes = new List<Node> ();
using System;
using System.ComponentModel;
using System.Windows.Forms;
using DevExpress.XtraBars;
namespace BarButtonItemDataBindingExample
{
internal sealed class BarButtonItemBinder : IBindableComponent
{
private readonly BarButtonItem barButtonItem;
@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:
@mika76
mika76 / OpenWithDosbox.reg
Created July 9, 2014 13:08
Add "Open with dosbox" option to folders in windows
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\Open with Dosbox]
"Icon"="C:\\Program Files (x86)\\DOSBox-0.74\\DOSBox.exe,0"
[HKEY_CLASSES_ROOT\Directory\shell\Open with Dosbox\command]
@="C:\\Program Files (x86)\\DOSBox-0.74\\DOSBox.exe \"%1\""
/* 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 / ko-chart.js
Last active May 2, 2018 15:24 — forked from jmhdez/ko-chart.js
Chart.js Knockout bindings
/*global ko, Chart */
(function(ko, Chart) {
ko.bindingHandlers.chartType = {
init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
if (!allBindings.has('chartData')) {
throw Error('chartType must be used in conjunction with chartData and (optionally) chartOptions');
}
},