Skip to content

Instantly share code, notes, and snippets.

View jerkovicl's full-sized avatar

Luka Jerković jerkovicl

  • Croatia / Madrid
View GitHub Profile
@jerkovicl
jerkovicl / requestIdleCallback.js
Created December 14, 2015 10:25 — forked from paullewis/requestIdleCallback.js
Shims rIC in case a browser doesn't support it.
/*!
* Copyright 2015 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jerkovicl
jerkovicl / ChromeRemoteDebugger.bat
Created December 15, 2015 21:21 — forked from FreaKzero/ChromeRemoteDebugger.bat
Windows - Remote Chrome debugging over Network (Start as Admin)
@echo off
netsh interface portproxy delete v4tov4 listenport=9222 listenaddress=0.0.0.0
start /b cmd /c call "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir=dev-mode-removeme --disk-cache-dir=null --overscroll-history-navigation=0 --disable-web-security -–allow-file-access-from-files "%~dp0/src/index.html"
timeout 5
netsh interface portproxy add v4tov4 listenport=9222 connectaddress=127.0.0.1 connectport=9222 listenaddress=0.0.0.0
cls
echo ============================================
echo Chrome started with following configuration:
echo ============================================
echo * No-Caching
@jerkovicl
jerkovicl / .gitconfig
Created December 18, 2015 18:33 — forked from rab/.gitconfig
A good starting point for ~/.gitconfig
# -*- Conf -*-
[color]
branch = auto
diff = auto
status = auto
showbranch = auto
ui = true
# color.branch
# A boolean to enable/disable color in the output of git-branch(1). May be set to always, false (or
@jerkovicl
jerkovicl / loadMore.js
Created March 17, 2016 13:36 — forked from fraserxu/loadMore.js
Simple load more function for ng-repeat with limitTo filter
// set the default amount of items being displayed
$scope.limit= 5;
// loadMore function
$scope.loadMore = function() {
$scope.limit = $scope.items.length
}
function Get-LongLat
{
[CmdletBinding()]
param
(
[Parameter(
Mandatory = $true,
ValueFromPipelineByPropertyName = $true
)]
[string[]]$ZipCode
@jerkovicl
jerkovicl / choco.mirrorfrom.lftp
Created August 4, 2016 14:20 — forked from nwgat/choco.mirrorfrom.lftp
choco.mirrorfrom.lftp
set sftp:auto-confirm yes
set sftp:connect-program 'ssh'
open sftp://user:password@site:port
mirror --verbose --use-pget-n=8 -c /remote/path /cygdrive/driveletter/folder
@jerkovicl
jerkovicl / choco.mirrorto.lftp
Created August 4, 2016 14:20 — forked from nwgat/choco.mirrorto.lftp
choco.mirrorto.lftp
set sftp:auto-confirm yes
set sftp:connect-program 'ssh'
open sftp://user:password@site:port
mirror -R --verbose --use-pget-n=8 -c /cygdrive/driveletter/folder /remote/path
@jerkovicl
jerkovicl / curlWinCMDSlackNotification.bat
Created October 7, 2016 19:39 — forked from sirkirby/curlWinCMDSlackNotification.bat
Send a slack notification from a windows command prompt using curl
curl -k -g -X POST -d "payload={\"text\":\"my important bot notification\", \"channel\":\"#monitoring\", \"username\":\"computer-bot\", \"icon_emoji\":\":computer:\"}" https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XxXxXxXxXXXxxXXXxxx
[Benchmark(Description = "ImageSharp Resize")]
public ImageSharpSize ResizeImageSharp()
{
ImageSharpImage image = new ImageSharpImage(Width, Height);
image.Resize(ResizedWidth, ResizedHeight);
return new ImageSharpSize(ResizedWidth, ResizedHeight);
}