Skip to content

Instantly share code, notes, and snippets.

🤖
Coding...

Mladen Mihajlović mika76

🤖
Coding...
  • Serbia
Block or report user

Report or block mika76

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mika76
mika76 / 1-setup.md
Created Nov 8, 2019 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra
View 1-setup.md

Methods of Signing with GPG

There are now two ways to approach this:

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

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 Krypt.co.

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 http://stackoverflow.com/questions/1770297/how-does-mef-determine-the-order-of-its-imports
@mika76
mika76 / stars.sh
Created Oct 18, 2019 — forked from sebble/stars.sh
List all starred repositories of a GitHub user.
View stars.sh
#!/bin/bash
USER=${1:-sebble}
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
PAGES=$((658/100+1))
echo You have $STARS starred repositories.
echo
View responsive-tables-in-pure-css.html
<table>
<thead>
<tr>
<th>Payment</th>
<th>Issue Date</th>
<th>Amount</th>
<th>Period</th>
</tr>
</thead>
<tbody>
@mika76
mika76 / toggle-fullscreen.js
Created Aug 30, 2019 — forked from jurebajt/toggle-fullscreen.js
Javascript: Toggle browser fullscreen mode
View toggle-fullscreen.js
$('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 / requestAnimationFrame-throttling.js
Created Aug 30, 2019 — forked from jurebajt/requestAnimationFrame-throttling.js
Javascript: Throttling with requestAnimationFrame
View requestAnimationFrame-throttling.js
// Polyfill for rAF
window.requestAnimFrame = (function() {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function(callback) {
window.setTimeout(callback, 1000 / 60);
};
})();
@mika76
mika76 / resize-1.js
Created May 21, 2019 — forked from crown3/resize-1.js
resize event: requestAnimationFrame + customEvent
View resize-1.js
(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 / readme.md
Last active Mar 19, 2019
Create self signed cert and hosting for self hosted owin webapi
View readme.md

Create self-signed cert

New-SelfSignedCertificate -Subject "SomeWebApi"

Get cert thumbprint

Get-ChildItem -path cert:\LocalMachine\My
@mika76
mika76 / Program.cs
Created Feb 27, 2019 — forked from nblumhardt/Program.cs
Exception data enricher for Serilog
View Program.cs
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 / profile.ps1
Created Oct 8, 2018 — forked from AndyPook/profile.ps1
powershell script to import VisualStudio environment variables
View profile.ps1
# 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])"
}
You can’t perform that action at this time.