This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# author: [email protected] | |
# 2015_12_12 | |
# show old programs: (installdate before 2010PS > | |
# source: https://gist.github.com/josy1024/d464770253fbab2642ed | |
# http://josy1024.blogspot.co.at/2015/06/automated-uninstall-of-old-programs.html | |
Get-WmiObject -Class Win32_Product -ComputerName . | Where-Object -FilterScript {$_.InstallDate -lt "20100000"} | Where-Object -FilterScript {$_.Name -NotLike "windows*"} | Where-Object -FilterScript {$_.Name -NotLike "Microsoft*"} | Where-Object -FilterScript {$_.Name -NotLike "AMD*"} | Where-Object -FilterScript {$_.Name -NotLike "google*"} | Where-Object -FilterScript {$_.Name -NotLike "7-zip*"} |Where-Object -FilterScript {$_.Name -NotLike ""} | Format-List -Property Name,InstallDate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# author: [email protected] | |
# 2015_12_12 | |
# source: https://gist.github.com/josy1024/c654fccb3d21df0d275d/ | |
# http://josy1024.blogspot.co.at/2015/06/automated-uninstall-of-old-programs.html | |
#remove old programs: | |
#PS > | |
( Get-WmiObject -Class Win32_Product -ComputerName . | Where-Object -FilterScript {$_.InstallDate -lt "20100000"} | Where-Object -FilterScript {$_.Name -NotLike "windows*"} | Where-Object -FilterScript {$_.Name -NotLike "Microsoft*"} | Where-Object -FilterScript {$_.Name -NotLike "AMD*"} | Where-Object -FilterScript {$_.Name -NotLike ""} ).Uninstall() | |
# remove all microsoft visualstudio programs:( Get-WmiObject -Class Win32_Product -ComputerName . | Where-Object -FilterScript {$_.Name -Like "Microsoft Visual*"} ).Uninstall() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# prestage remote desktop logons for other users... (have to know passwords # | |
# author: josef lahmer | |
# | |
# USE https://gallery.technet.microsoft.com/scriptcenter/Connect-Mstsc-Open-RDP-2064b10b | |
# https://gist.github.com/josy1024/917715eef3a87a3c0bf3 | |
# optimisations: | |
# (would be nice to know if i can store password hashes)? (to avoid clear text passwords) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var links = []; $('.type > a').each ( function () { | |
links.push($(this).attr('href')) | |
} ) | |
setInterval(function () { | |
if ( !links.length) { return; } | |
var link = links.shift(); | |
link += '.tcx'; | |
var newFrame = document.createElement('iframe'); | |
document.body.appendChild(newFrame); | |
newFrame.style = 'width: 1px; height: 1px;'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#author: josef lahmer | |
# 3.1.2016 | |
# | |
# PowerShell.exe -ExecutionPolicy Bypass -File .tcx2gpx.ps1 | |
# | |
# tcx = garmin training center tcx | |
# gpx = gpx xml | |
# depencies | |
# powershell, gpsbabel from http://www.gpsbabel.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem -Filter "*.tcx" -Recurse | Rename-Item -NewName {$_.name -replace 'tcx','xml' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# searches with in current directory for "not accessable" files puts it out to console and stores it to /tmp/noaccess | |
# noaccess no access | |
# | |
# author: Josef lahmer | |
# 11.1.2016 | |
# https://gist.github.com/josy1024/fe39201169f5e3cec115 | |
# http://josy1024.blogspot.co.at/2016/01/mr-robots-noaccess.html | |
# | |
# inspired by MR. ROBOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# connect to azure and office365 with powershell | |
# 2016-01-13 | |
# get password | |
$cred = Get-Credential | |
#office365 session | |
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred -Authentication Basic -AllowRedirection | |
Import-PSSession $Session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#snipplet | |
package { "at" : ensure => installed } | |
case $virtual { | |
"xenu": | |
{ | |
package { "kernel" : | |
name => "kernel-xen", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# inspired from: Zeitmanagement für Systemadministratoren Thomas A. Limoncelli | |
#take a sample of 100 requests... | |
# -i any (most systems have more than one interface) | |
tcpdump -i any -l -n arp | grep 'who-has' |head -100 > /tmp/arprequests.txt | |
# wich sources? | |
cat /tmp/arprequests.txt | awk '{ print $NF }' | sort | uniq -c | sort -nr |
OlderNewer