Skip to content

Instantly share code, notes, and snippets.

View TomasBouda's full-sized avatar
🏠
Working from home

Tomáš Bouda TomasBouda

🏠
Working from home
View GitHub Profile
using System.Net;
using System.Security;
using Polly;
using Serilog;
using Microsoft.AspNet.SignalR.Client;
namespace Test.SignalR;
/// <summary>
/// SignalR Hub client implementation for ASP.NET
/**
* @license
* Initially based on CodeMirror Python mode, copyright (c) by Marijn Haverbeke and others
* PowerShell mode, copyright (c) Andrey Shchekin, VapidWorx and others
* Distributed under an MIT license: http://codemirror.net/LICENSE
*/
(function(mod) {
'use strict';
if (typeof exports == 'object' && typeof module == 'object') // CommonJS
.btn {
display: inline-block;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: center;
text-decoration: none;
vertical-align: middle;
cursor: pointer;
-webkit-user-select: none;
param(
[Parameter(Mandatory = $false)]
[string]$OutFile,
[Parameter(Mandatory = $false)]
[switch]$HideHost,
[Parameter(Mandatory = $false)]
[switch]$HideNET,
[Parameter(Mandatory = $false)]
[switch]$HideNETCore
)
# Setup git addons
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
# Ensure that Get-ChildItemColor is loaded
Import-Module Get-ChildItemColor
# Set l and ls alias to use the new Get-ChildItemColor cmdlets
Set-Alias ls Get-ChildItemColor -Option AllScope
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
# Helper function to change directory to my git workspace
function mygit { Set-Location "C:\Data\GIT" }
function tcmd {
param(
[Parameter(Mandatory = $false, Position = 0)]
function Open-Chrome {
param(
[Parameter(Mandatory = $true)]
[string]$Url
)
Start-Process -FilePath 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' -ArgumentList $Url
}
function Invoke-SQL {
param(
[Parameter(Mandatory = $true)]
[string]$DataSource,
[Parameter(Mandatory = $true)]
[string]$Database,
[Parameter(Mandatory = $true)]
[string]$SqlCommand,
[Parameter(Mandatory = $false)]
[switch]$Scalar
@TomasBouda
TomasBouda / Get-WorkDay.ps1
Last active March 16, 2020 15:50
Returns n-th workday in given month(skipping weekends and us holidays).
function Get-WorkDay {
param(
[Parameter(Mandatory = $true)]
[int]$Day,
[Parameter(Mandatory = $false)]
[ValidateRange(1, 31)]
[int]$Month = (Get-Date).Month,
[Parameter(Mandatory = $false)]
[int]$Year = (Get-Date).Year,
[Parameter(Mandatory = $false, DontShow)]
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define("Gifffer", [], factory);
else if(typeof exports === 'object')
exports["Gifffer"] = factory();
else
root["Gifffer"] = factory();
})(this, function() {