Skip to content

Instantly share code, notes, and snippets.

View AlesRuzickaEu's full-sized avatar

Ales Ruzicka AlesRuzickaEu

View GitHub Profile
@AlesRuzickaEu
AlesRuzickaEu / Get-LogContent.ps1
Created September 4, 2015 11:12
Powershell script to print svclog files
Param
(
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
[string[]]
$Path,
[switch]
$ErrorOnly
@AlesRuzickaEu
AlesRuzickaEu / signPowershellScript.ps1
Created October 19, 2017 13:29
Sign Powershell Scripts
function Sign-File(
[Parameter(Mandatory=$True,Position=0,ValueFromPipeline)]
[string[]]
$FilePath) {
Set-AuthenticodeSignature $FilePath $(Get-ChildItem -Path cert:\CurrentUser\my -CodeSigningCert)
}
function Sign-Directory(
[Parameter(Position=0)]
#SingleInstance force
!d::
formattime, carrotcake, , yyyy-MM-dd
send %carrotcake%
return
!t::
formattime, carrotcake, , yyyy-MM-ddTHH:mm
send %carrotcake%
return
function Git-BranchesList() {
git branch --merged | ?{-not ($_ -like '*master')} | %{"$_".trim()}
}
function Git-BranchesClear() {
git branch --merged | ?{-not ($_ -like '*master')} | %{git branch -d "$_".trim()}
}
@AlesRuzickaEu
AlesRuzickaEu / router.js
Created August 9, 2018 08:32
Hyperapp hash router
import { h } from 'hyperapp'
const location = {
state: {
hash: window.location.hash
},
actions: {
changed: () => () => {
return { hash: window.location.hash }
},
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"profiles": [{
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"hidden": false,