Skip to content

Instantly share code, notes, and snippets.


Mladen Mihajlović mika76

  • Serbia
View GitHub Profile
mika76 / IniSerializer.cs
Last active Sep 13, 2020
INI Serializer for .NET Core in C# - Pretty basic with some validations and Serialize and Deserialize methods. There are lot's of variations for ini files though so it will probably not support every scenario. Feel free to adapt to your use-case.
View IniSerializer.cs
using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace tools
/// <summary>
/// Serializer class for ini files.
mika76 / MuuriGrid.vue
Created Aug 18, 2020 — forked from sploders101/MuuriGrid.vue
Array-based muuri grid
View MuuriGrid.vue
v-for="field in value"
mika76 / pliim-turnOff.scpt
Created Jun 12, 2020 — forked from zehfernandes/pliim-turnOff.scpt
One click and be ready to go up on stage and shine! -
View pliim-turnOff.scpt
# Turn on Notifications
do shell script "defaults -currentHost write doNotDisturb -bool FALSE; defaults -currentHost delete doNotDisturbDate; osascript -e 'quit application \"NotificationCenter\" ' && killall usernoted" -- this set 'Do not disturb' to false in the pref
# Show Desktop
do shell script "defaults write CreateDesktop -bool true; killall Finder"
# Show all windows
tell application "System Events"
set visible of (every process) to true
end tell
View index.html
<!DOCTYPE html>
<html lang="en">
<link rel=icon href="data:image/svg+xml,<svg xmlns='' viewBox='0 0 100 100'><text
y='.9em' font-size='90'>😍</text></svg>">
mika76 / int2ip.js
Created Mar 22, 2020 — forked from jppommet/int2ip.js
javascript conversion from ip address to long integer and vice versa
View int2ip.js
function int2ip (ipInt) {
return ( (ipInt>>>24) +'.' + (ipInt>>16 & 255) +'.' + (ipInt>>8 & 255) +'.' + (ipInt & 255) );
mika76 / copyfiles.ps1
Last active Jan 24, 2020
TFS powershell copy items to unc with credentials
View copyfiles.ps1
# Create credential from user pass strings
$User = "\administrator"
$PWord = ConvertTo-SecureString -String "pass123" -AsPlainText -Force
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord
# Create mapped drive Y: with the UNC path
New-PSDrive -Name Y -PSProvider filesystem -Root "\\\sharedfolder" -Credential $Credential
# Copy files to Y: drive
View QueryVisitor.cs
using Lucene.Net.Index;
using Lucene.Net.Search;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Lucene.Helpers
View 10-large.sql
select top 10 schema_name(tab.schema_id) + '.' + as [table],
cast(sum(spc.used_pages * 8)/1024.00 as numeric(36, 2)) as used_mb,
cast(sum(spc.total_pages * 8)/1024.00 as numeric(36, 2)) as allocated_mb
from sys.tables tab
join sys.indexes ind
on tab.object_id = ind.object_id
join sys.partitions part
on ind.object_id = part.object_id and ind.index_id = part.index_id
join sys.allocation_units spc
on part.partition_id = spc.container_id
mika76 /
Created Nov 8, 2019 — forked from troyfontaine/
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or

View MefCollections.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Collections.Specialized;
namespace AUtility
// From
You can’t perform that action at this time.