Skip to content

Instantly share code, notes, and snippets.

@hoest
hoest / post.py
Created September 6, 2012 11:47
Simple Python script to post a XML file to an web-interface
import httplib
import xml.dom.minidom
HOST = "www.domain.nl"
API_URL = "/api/url"
def do_request(xml_location):
"""HTTP XML Post request"""
request = open(xml_location, "r").read()
@hoest
hoest / profile.ps1
Created October 23, 2012 11:47
Keep Powershell history
# profile folder
$profileFolder = split-path $profile
# save last 100 history items on exit; with the 'exit' command
$historyPath = Join-Path $profileFolder "ps_history.xml"
# hook powershell's exiting event and hide the registration with -supportevent.
Register-EngineEvent -SourceIdentifier powershell.exiting -SupportEvent -Action {
Get-History -Count 100 | Export-Clixml (Join-Path $profileFolder "ps_history.xml") }
@hoest
hoest / AutoHotkey.ahk
Created February 13, 2014 07:43
AutoHotkey script
#SingleInstance force
; Shortcut keys
#i::Run, "C:\Program Files\Internet Explorer\iexplore.exe", , %HOME%
#b::Run, "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", , %HOME%
#t::Run, "C:\Program Files\ConEmu\ConEmu64.exe", , %HOME%
#v::Run, "C:\Program Files (x86)\Vim\vim74\gvim.exe", , %HOME%
#s::Run, "C:\Program Files\Sublime Text 3\sublime_text.exe", , %HOME%
#c::Run, "%windir%\system32\calc.exe", , %HOME%