View remove_crw.cmd
@echo off | |
echo Uninstalling KB3075249 (telemetry for Win7/8.1) | |
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart | |
echo Uninstalling KB3080149 (telemetry for Win7/8.1) | |
start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart | |
echo Uninstalling KB3021917 (telemetry for Win7) | |
start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart | |
echo Uninstalling KB3022345 (telemetry) | |
start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart | |
echo Uninstalling KB3068708 (telemetry) |
View remove-win10-spyware.bat
@echo off | |
AT > NUL | |
if %ERRORLEVEL% EQU 1 ( | |
echo Error: Not running as administrator. | |
echo Please right click the batch file and select 'Run as Administrator' | |
exit /b 1 | |
) | |
echo Uninstalling bad updates... |
View print_to_pdf.bas
sub print_to_pdf2 | |
if len(ThisComponent.getURL())=0 then | |
msgbox "Save document first!" | |
exit sub | |
end if | |
If (Not GlobalScope.BasicLibraries.isLibraryLoaded("Tools")) Then | |
GlobalScope.BasicLibraries.LoadLibrary("Tools") | |
End If |
View dump_http_headers.sh
# https://serverfault.com/a/633452 | |
stdbuf -oL -eL /usr/sbin/tcpdump -A -s 10240 -i lo "tcp port 82 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)" | egrep -a --line-buffered ".+(GET |HTTP\/|POST )|^[A-Za-z0-9-]+: " | perl -nle 'BEGIN{$|=1} { s/.*?(GET |HTTP\/[0-9.]* |POST )/\n$1/g; print }' |
View check_http_wget
#!/bin/bash | |
exec 2>&1 | |
[ -d /dev/shm -a -w /dev/shm ] && export TMPDIR=/dev/shm | |
# Parsing Input Parameters {{{ | |
##################################################################### | |
allparams=$* | |
g_myname_pid=$$ |
View recode.sh
#!/bin/bash | |
# | |
# recode | |
# | |
# Copyright 2011 Costin STROIE <costinstroie@eridu.eu.org> | |
# |
View super-tip.txt
// 4 spaces to 2 spaces | |
%s;^\(\s\+\);\=repeat(' ', len(submatch(0))/2);g | |
// Tab to 2 spaces | |
:%s/\t/ /g |
View nginx-lua-s3.nginxconf
location ~* ^/s3/(.*) { | |
set $bucket '<REPLACE WITH YOUR S3 BUCKET NAME>'; | |
set $aws_access '<REPLACE WITH YOUR AWS ACCESS KEY>'; | |
set $aws_secret '<REPLACE WITH YOUR AWS SECRET KEY>'; | |
set $url_full "$1"; | |
set_by_lua $now "return ngx.cookie_time(ngx.time())"; | |
set $string_to_sign "$request_method\n\n\n\nx-amz-date:${now}\n/$bucket/$url_full"; | |
set_hmac_sha1 $aws_signature $aws_secret $string_to_sign; | |
set_encode_base64 $aws_signature $aws_signature; |
View Bootstrap-EC2-Windows-CloudInit.ps1
# install 7-zip, curl and vim | |
# (Windows 2012 comes with .NET 4.5 out-of-the-box) | |
# Then use the EC2 tools to create a new AMI from the result, and you have a system | |
# that will execute user-data as a PowerShell script after the instance fires up! | |
# This has been tested on Windows 2012 64bits AMIs provided by Amazon (eu-west-1 ami-a1867dd6) | |
# | |
# Inject this as user-data of a Windows 2012 AMI, like this (edit the adminPassword to your needs): | |
# | |
# <powershell> | |
# Set-ExecutionPolicy Unrestricted |
View WinRM-Insecure-Bootstrap.ps1
winrm quickconfig -q -force | |
Enable-psremoting –force | |
Set-executionpolicy bypass –force | |
winrm set winrm/config/service/Auth '@{Basic="true"}' | |
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="1024"}' | |
winrm set winrm/config/client '@{TrustedHosts="*"}' | |
# Configuration Warning: |
NewerOlder