Skip to content

Instantly share code, notes, and snippets.

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

Mladen Mihajlović mika76

🤖
Coding...
  • Serbia
  • 03:03 (UTC +02:00)
View GitHub Profile
-------------------------------------------------------------------------------
Base64 and related binary to 'printable' ASCII encoding.
-------------------------------------------------------------------------------
Base64...
Encodes a binary string into a printable form using a set of 64 characters
such that 3 binary charcaters become 4 printable characters
A-Z a-z 0-9 + /
@mika76
mika76 / profile.ps1
Created October 8, 2018 18:24 — forked from AndyPook/profile.ps1
powershell script to import VisualStudio environment variables
# Set environment variables for Visual Studio Command Prompt
# Based on: http://stackoverflow.com/questions/2124753/how-i-can-use-powershell-with-the-visual-studio-2010-command-prompt
$version=14
pushd "c:\Program Files (x86)\Microsoft Visual Studio ${version}.0\Common7\Tools"
cmd /c "vsvars32.bat&set" |
foreach {
if ($_ -match "=") {
$v = $_.split("=")
set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
}
@mika76
mika76 / Program.cs
Created February 27, 2019 07:32 — forked from nblumhardt/Program.cs
Exception data enricher for Serilog
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Serilog;
using Serilog.Core;
using Serilog.Events;
using Serilog.Formatting.Json;
@mika76
mika76 / readme.md
Last active March 19, 2019 09:35
Create self signed cert and hosting for self hosted owin webapi

Create self-signed cert

New-SelfSignedCertificate -Subject "SomeWebApi"

Get cert thumbprint

Get-ChildItem -path cert:\LocalMachine\My
@mika76
mika76 / resize-1.js
Created May 21, 2019 11:27
resize event: requestAnimationFrame + customEvent
(function() {
var throttle = function(type, name, obj) {
obj = obj || window;
var running = false;
var func = function() {
if (running) { return; }
running = true;
requestAnimationFrame(function() {
obj.dispatchEvent(new CustomEvent(name));
running = false;
@mika76
mika76 / requestAnimationFrame-throttling.js
Created August 30, 2019 08:29 — forked from georgebyte/requestAnimationFrame-throttling.js
Javascript: Throttling with requestAnimationFrame
// Polyfill for rAF
window.requestAnimFrame = (function() {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function(callback) {
window.setTimeout(callback, 1000 / 60);
};
})();
@mika76
mika76 / toggle-fullscreen.js
Created August 30, 2019 09:30 — forked from georgebyte/toggle-fullscreen.js
Javascript: Toggle browser fullscreen mode
$('body').click(function(event) {
var el, rfs;
if ($('body').hasClass('fullscreen')) {
el = document;
rfs = el.cancelFullScreen || el.webkitCancelFullScreen || el.mozCancelFullScreen;
$('body').removeClass('fullscreen');
} else {
el = document.documentElement;
rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen;
@mika76
mika76 / responsive-tables-in-pure-css.html
Created August 30, 2019 09:35 — forked from georgebyte/responsive-tables-in-pure-css.html
HTML5, CSS: Responsive tables in pure CSS
<table>
<thead>
<tr>
<th>Payment</th>
<th>Issue Date</th>
<th>Amount</th>
<th>Period</th>
</tr>
</thead>
<tbody>
@mika76
mika76 / stars.ps1
Last active August 14, 2025 12:09 — forked from sebble/stars.sh
List all starred repositories of a GitHub user.
[CmdletBinding()]
param (
[Parameter()]
[string]
$user = "mika76"
)
$URL = "https://api.github.com/users/$user/starred"
$PAGE = 0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Collections.Specialized;
namespace AUtility
{
// From http://stackoverflow.com/questions/1770297/how-does-mef-determine-the-order-of-its-imports