Skip to content

Instantly share code, notes, and snippets.

@peterjs
peterjs / gist:e00b62114c90a9f636c6
Created February 25, 2016 13:54
hospitale.txt
choco install libreoffice --force
choco install adobereader --force
choco install firefox --force
choco install flashplayerplugin --force
choco install vlc --force
choco install 7zip.install --force
choco install 7zip.commandline --force
cup adobereader
choco install libreoffice --force
choco install adobereader --force
choco install dropbox --force
choco install javaruntime --force
choco install firefox --force
choco install googlechrome --force
choco install flashplayerplugin --force
choco install vlc --force
choco install 7zip.install --force
choco install 7zip.commandline --force
choco uninstall libreoffice
choco uninstall libreoffice
choco uninstall adobereader
choco uninstall dropbox
choco uninstall windirstat
choco uninstall wireshark
choco uninstall sublimetext3
choco uninstall filezilla
choco uninstall winscp
choco uninstall putty
choco uninstall thunderbird
Update-ExecutionPolicy Unrestricted
cinst sourcetree
@peterjs
peterjs / gist:d7963c8e98dc615c0309
Created November 22, 2014 21:02
netcat webserver test
#!/bin/bash
# web.sh -- http://localhost:9000/
RESP=/tmp/webresp
[ -p $RESP ] || mkfifo $RESP
while true ; do
( cat $RESP ) | nc -l 9000 | (
REQ=`while read L && [ " " "<" "$L" ] ; do echo "$L" ; done`
echo "[`date '+%Y-%m-%d %H:%M:%S'`] $REQ" | head -1
@peterjs
peterjs / gist:13543c146c585e1067cc
Created November 22, 2014 20:52
Subnet scanner - when nmap is not available
CURR=1
SUBNET="192.168.50"
while [ $CURR -lt 255 ] ; do
ping -c1 -t1 $SUBNET.$CURR 2>&1 >/dev/null
if [ "$?" -eq "0" ]; then
echo "$SUBNET.$CURR"
fi
let CURR=$CURR+1
done
@peterjs
peterjs / gist:8041753
Last active March 18, 2018 09:53
Change keyboard layout on getting/losing focus
;========================================================================
;
; Template: WinTrigger (former OnOpen/OnClose)
; Description: Act upon (de)activation/(un)existance of programs/windows
; Online Ref.: http://www.autohotkey.com/forum/viewtopic.php?t=63673
;
; Last Update: 15/Mar/2010 17:30
;
; Created by: MasterFocus
; http://www.autohotkey.net/~MasterFocus/AHK/
@peterjs
peterjs / timestamp.bat
Created October 28, 2013 12:46
Windows batch file to move/rename file with a timestamp
:loop
for /f "skip=1" %%x in ('wmic os get localdatetime') do set mydate=%%x
move c:\s07a.rtf c:\nefros_connector_output\%mydate%.rtf
goto loop