Skip to content

Instantly share code, notes, and snippets.

View mkurdej's full-sized avatar

Marek Kurdej mkurdej

View GitHub Profile
@mkurdej
mkurdej / keybase.md
Created March 29, 2017 08:39
Kyebase.io proof

Keybase proof

I hereby claim:

  • I am mkurdej on github.
  • I am kurdej (https://keybase.io/kurdej) on keybase.
  • I have a public key ASBOPTHtKl5Lz5pjWFfX_O3bE4nNm3vAVyZxuLvTLuGWIQo

To claim this, I am signing this object:

@mkurdej
mkurdej / pi.cpp
Last active March 13, 2017 13:02
Pi day challenge
#include <random>
template <typename T>
struct point_2d {
T x, y;
};
static std::random_device random_device;
static std::mt19937 random_engine{random_device()};
@mkurdej
mkurdej / for_each_adjacent.cpp
Last active November 30, 2015 12:37
for_each_adjacent is a for_each equivalent for adjacent container elements
#include <algorithm>
#include <array>
#include <cassert>
// #include <experimental/apply> for std::experimental::apply
// #include <functional> // for std::invoke
#include <iostream> // example only
#include <iterator>
#include <string> // example only
#include <vector> // example only
@mkurdej
mkurdej / Azure_AddEndpointSSH.ps1
Last active September 18, 2015 14:49
Azure: Add SSH endpoint to a VM
$ErrorActionPreference = "Stop"
Add-AzureAccount
Select-AzureSubscription -Name "Continuous Integration"
Write-Host 'The following VM instances are available:'
$vms = Get-AzureVM
$vms | foreach { $_.Name }
$vmName = Read-Host 'Enter the name of the VM to show its endpoints'