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
| syntax "ml" ".*\.(xml|xul|rdf|rss|xbl|sgml?)$" | |
| color white "^.+$" | |
| # Attribute names | |
| color brightblue start="<" end=">" | |
| # Attribute text | |
| color brightgreen ""[^"]+"" | |
| # Tag names | |
| color brightcyan "<[^> ]+" | |
| # Alligators | |
| color cyan "<" |
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
| import-module SSIS | |
| $ssis_package = "D:\MyFile.dtsx"; | |
| $package = Get-ISPackage -path $ssis_package; | |
| $package.Executables | Where-Object { $_.InnerObject -like 'Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask' } | %{ $fn = $_.Name+".sql"; $_.InnerObject.SqlStatementSource > $fn } |
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 | |
| [[ -n "${1}" ]] && openssl x509 -in <( echo "GET /" | openssl s_client -connect ${1}:443 2>&1 | grep -A 65535 'Server certificate' | tail -n+2 | grep -B 65535 'END CERTIFICATE' ) -noout -text -purpose |
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
| on error resume next | |
| strComputer=InputBox ("Enter the computer name of the server you'd like to query for the Service Tag:") | |
| Set objWMIservice = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") | |
| set colitems = objWMIservice.ExecQuery("Select * from Win32_BIOS",,48) | |
| For each objitem in colitems | |
| Wscript.echo "Dell Service Tag: " & objitem.serialnumber | |
| Next |
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
| #To add more commands, hack them into the $commands array: | |
| $commands = @( | |
| @{"cmd" = "D:\Documents\Powershell\battwo.bat"; "args" = "yo"}, | |
| @{"cmd" = "D:\Documents\Powershell\batone.bat"; "args" = "yo2"} | |
| ); | |
| $jobs = @(); | |
| foreach($cmd in $commands) { | |
| $startinfo = new-object System.Diagnostics.ProcessStartInfo | |
| $startinfo.FileName = $cmd.cmd; |
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
| gci *\* | where {$_.PSIsContainer -and $_.CreationTime -lt '2013-01-01T00:00:00'} | %{ write-host $_.FullName; remove-item -recurse $_;} |
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
| $pinvokeCode = @" | |
| using System; | |
| using System.Runtime.InteropServices; | |
| using System.Collections.Generic; | |
| namespace Resolution | |
| { | |
| [StructLayout(LayoutKind.Sequential)] | |
| public struct DEVMODE1 | |
| { | |
| [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] |
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
| #!/usr/bin/perl -w | |
| # William Lam | |
| # 12/10/2009 | |
| # http://engineering.ucsb.edu/~duonglt/vmware/ | |
| # http://communities.vmware.com/docs/DOC-9852 | |
| use strict; | |
| use warnings; | |
| use IO::Socket::SSL; | |
| use Term::ANSIColor; |
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
| use strict; | |
| use warnings; | |
| open INPUT, "./robtest.txt"; | |
| while(<INPUT) { | |
| chomp; | |
| print "line: '$_'\n"; | |
| } |
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 | |
| # put new bonded configuration in interfaces.bonded and cd into /etc/network | |
| ifdown -a; mv interfaces interfaces.old; mv interfaces.new interfaces; ifup lo; ifup bond0 & ifup eth0; ifup eth1; |