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
rem UBER COMMAND!! (v2) | |
rem One-liner (technically) - prompts for User, Pass, SecGroup. Includes validation, pre-checks for UAC elevated privileges, checks for user pre-existence and group existence before running, requires a User and Group. | |
cmd /v /c "cls&(net file >nul 2>&1 && ((set /p "u=Enter username: "&&(net user !u! >nul 2>&1&&echo Error: user !u! already exists||(set /p "p=Password: "& set /p "g=Security Group: "&&(net localgroup !g! >nul 2>&1&& (net user !u! !p! /add>nul&&net localgroup !g! /add !u!>nul&&echo SUCCESS: Added new user !u! to group !g!&net user >nul 2>&1)|| (echo Error: specified group does not exist & net user >nul 2>&1))||(echo Error: you must specify a group)))||echo Error: user must not be blank)) || echo Error: you should run as admin)&echo.&echo.&pause" | |
rem Not-so-UBER command (v1) | |
rem One-liner, set the User, Pass, Group in the beginning of the command. No prompts, no validation. Lame. | |
cmd /v /c "set u=myUser&set p=password1&set g=Administrators&cls&net user !u! !p! /add>nul 2> |
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
# REQUIRES PERL.EXE! | |
# | |
# Patch firmware .img files used for Netgear WNDR3800 routers to work with Netgear WNDR3800SW | |
# The SW model routers are specfic to SureWest Communications (ISP from northern CA) | |
# The routers are identical, but require a different header on the .img file. This should work with any | |
# .img file that works with a WNDR3800, including DD-WRT, OpenWRT, and the Netgear factory firmware | |
# | |
## Usage: .\patch3800sw <input img file path> <output img file path> | |
# | |
## Example: .\patch3800sw openwrt-ar71xx-generic-wndr3800-squashfs-factory.img openwrt-wndr3800sw.img |
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
$hostColWidth = 40 | |
arp -a | % { | |
$line=$_.ToString().Trim() | |
try { | |
if ($line -like "Interface:*" -or $line -eq "") { | |
$line | |
} elseif ($line -like "Internet Address*") { | |
" " + "HostName".PadRight($hostColWidth, ' ') + $line | |
} else { | |
$res=[System.Net.Dns]::gethostentry($line.ToString().Trim().Split(" ")[0]) |
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
@echo off & setlocal enabledelayedexpansion | |
:: Backup.bat: | |
:: Adam Plocher - gist.github.com/aplocher - bitcollectors.com | |
:: | |
:: --Description: | |
:: Synchronize (backup) a directory to another dir using VSS (volume shadow copy | |
:: service) in Windows to help ensure a successful copy without locked files | |
:: impeding the process. | |
:: | |
:: Can be called from command line or can be used to install a scheduled task |
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
param ( | |
[switch]$Relaunched = $false | |
) | |
$ScriptPath = (Get-Variable MyInvocation).Value.MyCommand.Path | |
function StartOperation { | |
Write-Host | |
Write-Host Now attempting to regenerate missing manifest files... | |
Write-Host |
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
@echo off | |
rem FOR RESETTING SYNAPTICS MOUSE DRIVER | |
rem HELPFUL FOR WHEN MOUSE REGULARLY FREEZES AFTER EXPLORER.EXE HANGS | |
rem OR SCROLL/GESTURES STOP WORKING RANDOMLY | |
taskkill -f -im syntpenh.exe | |
pushd C:\Program Files\Synaptics\SynTP | |
start "" "syntpenh.exe" | |
popd | |
timeout /t 2 /nobreak >nul | |
exit /b |
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 | |
# play YUV444 FULL HD file | |
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \ | |
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \ | |
videoconvert ! \ | |
autovideosink | |
# play YUV422 FULL HD file | |
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \ |
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
$ErrorActionPreference = "Stop" | |
$client = new-object System.Net.WebClient | |
# Reset vagrant password so it's not expired | |
([adsi]"WinNT://vagrant-2012-r2/vagrant").SetPassword("P@55w0rd!") | |
# Setup UAC wrapper ;( | |
if(!(Test-Path -Path "C:\uacts_x64.zip")) { | |
Write-Output "Setting up UAC wrapper" | |
$client.DownloadFile("http://www.itknowledge24.com/files/uacts_x64.zip", "C:\uacts_x64.zip") |
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
#!/usr/bin/python | |
# | |
# usage: clapper.py [-h] [--on | --off] | |
# | |
# With no arguments, this will run continuously and listen for clap noises to | |
# trigger an RF power plug to turn on or off (aka The Clapper). Can | |
# alternatively be used to manually control a power plug with arguments | |
# | |
# optional arguments: | |
# -h, --help show this help message and exit |
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
@echo off | |
setlocal | |
:: <config> | |
:: CONFIGURATION STUFF BELOW | |
:: Base folder where the new sub-folders will be created. Do NOT include a trailing slash [eg, c:\temp is ok, but not c:\temp\] | |
set "baseDir=C:\TEMPOUTPUT" | |
:: The second destination to recieve a copy of these files | |
set "baseDir2=C:\TEMPOUTPUT2" |