Skip to content

Instantly share code, notes, and snippets.

@murven
murven / load-json.ps1
Created May 22, 2018 10:39
Load JSON files as objects
Get-ChildItem -Filter *.json | Get-Content -Raw | ConvertFrom-Json
@murven
murven / display-external-ip.ps1
Created May 5, 2018 02:38
Gets the external IP address
Invoke-RestMethod http://ipinfo.io/json | Select -exp ip
gwmi Win32_Product -Filter "Name LIKE 'Extension Name%'" | foreach { $_.Uninstall() }
@murven
murven / git-save-history-to-file.bat
Last active April 13, 2018 14:08
Git: save commit history (excluding merges) to a file.
git log --pretty=format:"%h - %an, %ad : %s" --no-merges > output-file.txt

Keybase proof

I hereby claim:

  • I am murven on github.
  • I am murven (https://keybase.io/murven) on keybase.
  • I have a public key ASAzwa4EbwZFcHESiQP_T2Unyy4laWR5eN5aYMv6cpA-Iwo

To claim this, I am signing this object:

@murven
murven / boolean-lambda.fs
Created May 17, 2017 04:13
boolean in lambda calculus
let identidad x = x
let verdadero x y = identidad x
let falso x y = identidad y
let negacion x = x falso verdadero
let contrario booleano x y = booleano y
let si booleano x y = booleano x y
let a = si (verdadero) 5 6
@murven
murven / write-OS-info-to-file.ps1
Created May 13, 2017 22:27
Write OS information to file
((gwmi win32_operatingsystem).Properties) | % { $_.Name + ": " + $_.Value } > OSInformation.txt
@murven
murven / path-to-url.ps1
Last active May 11, 2017 00:11
Local path to URL in PowerShell
(dir *.jpg -Recurse -File).FullName.Replace("\","/").Replace("S:/Your/Local/Path/here","https://www.yourdomainhere.com/remote/path/here").Replace(" ","-") > to-file.txt
@murven
murven / Zapote.ts
Created October 10, 2016 22:23
CreateJS example
module Zapote {
/// <reference path="typings/easeljs/easeljs.d.ts"/>
/// <reference path="typings/createjs-lib/createjs-lib.d.ts"/>
/// <reference path="typings/tweenjs/tweenjs.d.ts"/>
class GameItem {
shape: createjs.Shape;
speedX: number;
speedY: number;
speedAlpha: number;
constructor(shape: createjs.Shape, speedX: number, speedY: number, speedAlpha: number) {
@murven
murven / play-sound.ps1
Created July 26, 2016 05:58
Play sound in PowerShell
$player = New-Object System.Media.SoundPlayer "$env:windir\Media\notify.wav"
$player.Play()