This file contains hidden or 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 | |
##original https://gist.github.com/1016433 | |
#Had issues with this and many scripts as they all assumed that my primary router had ipv6 support and that I wasn't hiding behind something. | |
#This script sets your Linux (I use Ubuntu) box to function as a 6RD routing device. | |
#I've left out radvd as I use HE TunnelBroker for my network's addressing. | |
#Get Charter's 6rd host | |
HOST6RD=$(nslookup 6rd.charter.com | grep "Address"| awk '{ print $2 }'| tail --lines=1); |
This file contains hidden or 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-Service -DisplayName "Windows Update" | Stop-Service -Force; | |
rm -force -recurse C:\Windows\SoftwareDistribution -ea silentlycontinue; | |
Get-Service -DisplayName "Windows Update" | Start-Service; |
This file contains hidden or 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-clusternode | %{ get-vm -ComputerName $_.name } | %{ get-vhd -VMId $_.id -ComputerName $_.computername; } | measure -Sum size).sum / 1TB |
This file contains hidden or 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
<?php | |
//Requires php with the openssl module. | |
//This is useful for instances where installing openssl isn't an option | |
// but PHP is available, like on Windows servers using WAMP. | |
//use php extractpfx.php /path/tocert.pfx "pass phrase" | |
//http://php.net/manual/en/function.openssl-pkcs12-read.php | |
if(file_exists($argv[1])) { | |
$rawpfx = file_get_contents($argv[1]); |
This file contains hidden or 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 | |
aptitude search linux-image* -F "%c %p" | grep -E "^i.*" | grep -v -E "\slinux-image-generic\s" | grep -v -E `(uname -r | awk '{split($0, a, "-[a-z]"); print a[1];'})` | awk '{ print $2; }' | xargs aptitude remove -y; | |
update-grub; |
This file contains hidden or 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
//open dev console of browser | |
//paste jquery.min.js contents | |
//https://github.com/jquery/jquery/releases | |
//load entire page | |
var scroller = setInterval(function() { window.scrollTo(0,document.body.scrollHeight); }, 1000); | |
//stop scroller | |
clearInterval(scroller); |
This file contains hidden or 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
<?php | |
//package up pem encoded certificate and key into a pfx (PKCS #12) file with your handy-dandy already installed php.exe. | |
$outpfx = "./out.pfx"; | |
$cert = openssl_x509_read(file_get_contents("./domain.cer")); | |
$privatekey = file_get_contents("./domain.key"); | |
$passphase = "somepass"; | |
openssl_pkcs12_export_to_file($cert, $outpfx, $privatekey, $passphrase); |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
Converts files to the given encoding. | |
Matches the include pattern recursively under the given path. | |
.EXAMPLE | |
Convert-FileEncoding -Include *.js -Path scripts -Encoding UTF8 | |
#> | |
function Convert-FileEncoding([string]$Include, [string]$Path, [string]$Encoding='UTF8') { | |
$count = 0 |
This file contains hidden or 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 a = document.getElementsByClassName("_3m9g"); | |
for( var i = a.length-1; i >= 0; i--) { try { console.log(i); a[i].parentElement.removeChild(a[i]); } catch (ex) {} } | |
a = document.getElementsByClassName("UFIAddComment"); | |
for( var i = a.length-1; i >= 0; i--) { try { console.log(i); a[i].parentElement.removeChild(a[i]); } catch (ex) {} } |
This file contains hidden or 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
$root = "http://pdf.quad.download.s3.amazonaws.com/"; | |
$mroot = $root; | |
if($pdfs -eq $null -or $pdfs.count -eq 0) { | |
$pdfs = @{}; | |
while(1) { | |
$mroot; | |
$res = [xml](iwr $mroot | select -ExpandProperty content); | |
$res.ListBucketResult.Contents | ?{ [regex]::IsMatch($_.key, "\.pdf`$", "IgnoreCase") } | %{ | |
try { |
OlderNewer