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
| Param( | |
| [Parameter(Mandatory=$True,Position=1)] | |
| [string]$username, | |
| [Parameter(Mandatory=$True,Position=1)] | |
| [string]$baseurl, | |
| [Parameter(Mandatory=$True,Position=1)] | |
| [string]$MessageType, | |
| [Parameter(Mandatory=$True,Position=1)] | |
| [string]$body | |
| ) |
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
| param( | |
| [Parameter(Mandatory=$true, Position=1)][string]$fileName | |
| ) | |
| $currentDirectory = Get-Location | |
| $shell_app=new-object -com shell.application | |
| $zip_file = $shell_app.namespace((get-item $fileName).FullName) | |
| $destination = $shell_app.namespace($currentDirectory.Path) | |
| $destination.Copyhere($zip_file.items()) |
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
| [{"id":10071673,"name":"BabyBook","full_name":"waldronj/BabyBook","owner":{"login":"waldronj","id":1923489,"avatar_url":"https://secure.gravatar.com/avatar/81b5484ff985c464e5fdaf0222693e54?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","gravatar_id":"81b5484ff985c464e5fdaf0222693e54","url":"https://api.github.com/users/waldronj","html_url":"https://github.com/waldronj","followers_url":"https://api.github.com/users/waldronj/followers","following_url":"https://api.github.com/users/waldronj/following{/other_user}","gists_url":"https://api.github.com/users/waldronj/gists{/gist_id}","starred_url":"https://api.github.com/users/waldronj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldronj/subscriptions","organizations_url":"https://api.github.com/users/waldronj/orgs","repos_url":"https://api.github.com/users/waldronj/repos","events_url":"https://api.github.com/users/waldronj/events{/privacy}","received_events_url":"https://api.github.com/user |
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
| class PylonstestingController(BaseController): | |
| jac = {'server': 'someSite'} | |
| jira = JIRA(options=jac,basic_auth=('SomeUser', 'SomePassword')) | |
| def index(self, id): | |
| #jac = {'server': 'someSite'} | |
| #jira = JIRA(options=jac,basic_auth=('SomeUser', 'SomePassword')) | |
| searchString = 'project=' + id + '&status=open' |
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 pexpect | |
| import sys | |
| from sys import argv | |
| script, environment = argv | |
| command = "pyctrl-shell -e %s" % environment | |
| child = pexpect.spawn(command, logfile=sys.stdout) | |
| child.expect("In ", timeout=10) | |
| child.sendline("bigip.active_partition = 'SomePartition'") |
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
| function get-website ($url){ | |
| (new-object system.net.webclient).downloadstring($url) | |
| } |
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
| PS C:\> $content = Get-Content .\test.json | |
| PS C:\> $content[0] | |
| PS C:\> $content[1] | |
| PS C:\> $content[2] | |
| StatusCode : 200 | |
| PS C:\> $content[3] | |
| StatusDescription : OK | |
| PS C:\> $content[4] |
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 sys | |
| data = [('1', 'Lorem ipsm bla bla bla'), | |
| ('2', '1111111222255555'), | |
| ('3', 'Nm: 612312345'), | |
| ('4', 'asdasdafassda'), |
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
| function Size($w, $h) | |
| { | |
| New-Object System.Management.Automation.Host.Size($w, $h) | |
| } | |
| function resize() | |
| { | |
| Write-Host '[Arrows] resize [Esc] exit ...' | |
| $ErrorActionPreference = 'SilentlyContinue' | |
| for($ui = $Host.UI.RawUI;;) { |
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
| $numbers = 1..10 | |
| $i = 0 | |
| while($i -le 10){ | |
| $numbers | |
| $i++ | |
| } |
OlderNewer