Skip to content

Instantly share code, notes, and snippets.

View nprokopic's full-sized avatar

Nikola Prokopić nprokopic

View GitHub Profile
@jessfraz
jessfraz / boxstarter.ps1
Last active April 11, 2024 16:02
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@gregjhogan
gregjhogan / ansible-win-10-wsl-config.sh
Last active October 28, 2021 11:43
ansible windows 10 WSL configuration
sudo apt-get -y update
sudo apt-get -y install python
sudo easy_install pip
sudo pip install ansible
sudo pip install "pywinrm>=0.2.2"
# kerberos authentication support
#sudo apt-get install -y python-dev libkrb5-dev krb5-user
#sudo pip install pywinrm[kerberos]
@mgravell
mgravell / more awaiting.md
Last active April 20, 2017 07:08
More comparisons of async/await implementations

Objective:

For Task<T> and ValueTask<T> (T=int as a common non-trivial but inlineable case), compare async performance in the synchronous scenario (i.e. where data happens to be buffered - common in deserialization etc code) for 3 implementations:

  • using await throughout
  • using synchronous code until incompleteness detected (via IsCompleted); switch via local async Awaited if needed
  • using synchronous code until incompleteness detected (via IsCompletedSuccessfully); switch via local async Awaited if needed

Note:

@bradwilson
bradwilson / 1.0.0-rc3-004530.csproj
Last active February 11, 2017 00:41
Blank project file for xUnit.net for MSBuild v15 (as generated by `dotnet new`)
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" />
<PackageReference Include="xunit" Version="2.2.0-beta5-build3474" />
@alexlau811
alexlau811 / OverrideFormattedStringExtension.cs
Created March 8, 2015 10:53
Override default FormattedString behaviour to allow custom font to be used in Label of Xamarin.Forms.Android
public static class OverrideFormattedStringExtension
{
//
// Static Methods
//
public static SpannableString ToAttributed(this FormattedString formattedString, Font defaultFont, Color defaultForegroundColor, TextView view)
{
if (formattedString == null)
{
return null;
# Thanks to this post:
# http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x
$ brew install cabextract
$ cd ~/Downloads
$ mkdir consolas
$ cd consolas
$ curl -O http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe
$ cabextract PowerPointViewer.exe
$ cabextract ppviewer.cab