Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
Coding...

Mladen Mihajlović mika76

🤖
Coding...
View GitHub Profile
View foms_smartcard.js
// Read FOMS (Russian Health Card) http://www.openscdp.org/scsh3/index.html
// with emulator
// Romam Kharin <romiq.kh@gmail.com>, 2014
// based on explore.js
function SimFOMS () {
this.fsel = 0; // 0 - none, num - num
this.data0201 = new ByteString("", HEX);
@mika76
mika76 / compose.js
Created Mar 6, 2021 — forked from goldhand/compose.js
ATA JS (Day 2) Functions - Daily Assignment Solutions reviewed in class
View compose.js
const reduce = require("./reduce");
/**
* Performs right-to-left function composition. The rightmost function may have
* any arity; the remaining functions must be unary.
* compose(f, g)(x) >> f(g(x))
*
* @example
* const doubleNegative = compose(x => x * -1, x => x * 2);
* doubleNegative(5); // -10
@mika76
mika76 / Info.cshtml
Last active Oct 20, 2021
phpinfo like page for .net core
View Info.cshtml
@page
@{
Layout = "";
}
@using System.Linq;
@using System.Collections;
@using System.Reflection;
<html>
View ReadReferencesAssemblies.ps1
$callingAssembly = resolve-path $args[0]
echo "Running for $callingAssembly"
$ass = [Reflection.Assembly]::Loadfile($callingAssembly)
# [Reflection.AppDomain]::CurrentDomain
$refAssemblies = $ass.GetReferencedAssemblies()
@mika76
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
mika76 / MuuriGrid.vue
Created Aug 18, 2020 — forked from sploders101/MuuriGrid.vue
Array-based muuri grid
View MuuriGrid.vue
<template>
<div
ref="muuriel"
class="muuri"
>
<div
class="muuri-item"
v-for="field in value"
:muurikey="field[muurikey]"
@mika76
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! - https://zehfernandes.github.io/pliim/
View pliim-turnOff.scpt
# Turn on Notifications
do shell script "defaults -currentHost write com.apple.notificationcenterui doNotDisturb -bool FALSE; defaults -currentHost delete com.apple.notificationcenterui 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 com.apple.finder 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">
<head>
<link rel=icon href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text
y='.9em' font-size='90'>😍</text></svg>">
</head>
<body>
</body>
</html>
@mika76
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) );
}