less {filename}
Navigation | |
---|---|
SPACE |
forward one window |
b |
backward one window |
d |
forward half window |
<?php | |
function uuid() { | |
$s = bin2hex(random_bytes(16)); | |
return sprintf('%s-%s-%s-%s-%s', | |
substr($s, 0, 8), | |
substr($s, 8, 4), | |
substr($s, 12, 4), | |
substr($s, 16, 4), |
#Small object to simplify the handling of credentials. | |
class CredObject { | |
$Name | |
$Ip | |
$Username | |
$Password | |
} | |
#Change to full path of the credentials file with columns: Name, Ip, Username, Password | |
$machines = Import-CSV -Path "\path\to\machines.csv" |
#Get the local accounts on a machine | |
Get-WmiObject -Class Win32_UserAccount -Filter "LocalAccount='$True'" | Select-Object Name, Disabled |
#Small object to make the handling of credentials simpler. | |
class CredObject { | |
$Username | |
$Password | |
} | |
#Create the session to the domain controller. | |
$dcSession = Create-Session -Ip 10.0.0.10 -Username "Administrator" -Password "MyVerySecurePassword" | |
#Get all the users who aren't the Administrator |
Function Show-ProcessTree { | |
[CmdletBinding()] | |
Param($allprocess) | |
Begin { | |
# Identify top level processes | |
# They have either an identified processID that doesn't exist anymore | |
# Or they don't have a Parentprocess ID at all | |
#$allprocess = Get-WmiObject -Class Win32_process | |
$uniquetop = ($allprocess).ParentProcessID | Sort-Object -Unique |
<?php | |
use Badcow\DNS\Parser\Parser; | |
use Badcow\DNS\ZoneBuilder; | |
require_once __DIR__ . '/../vendor/autoload.php'; | |
$example = <<< 'DNS' | |
$ORIGIN example.com. | |
$TTL 1337 |
javascript:(function(){var a=document.getElementsByTagName('input');for(var i=0,e;e=a[i];i++)if(e.getAttribute('type')=='password')e.setAttribute('type', 'text');})() |
#!/usr/bin/env bash | |
PREFIX='http://example.com/gallery/pic_' | |
SUFFIX='.jpg' | |
START=1 | |
END=25 | |
FORMAT="%02d" | |
for i in `seq $START $END`; | |
do |
sh$ ffmpeg -i file.flac -b:a 256k file.mp3 | |
sh$ for f in *.flac;do ffmpeg -i $f -b:a 256k $f.mp3;done | |
sh$ for f in *.m4a; do ffmpeg -i "$f" -acodec libmp3lame -ab 256k "${f%.m4a}.mp3"; done |