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 Unzip($zipfile, $outdir) | |
{ | |
Add-Type -AssemblyName System.IO.Compression.FileSystem | |
$archive = [System.IO.Compression.ZipFile]::OpenRead($zipfile) | |
foreach ($entry in $archive.Entries) | |
{ | |
$entryTargetFilePath = [System.IO.Path]::Combine($outdir, $entry.FullName) | |
$entryDir = [System.IO.Path]::GetDirectoryName($entryTargetFilePath) | |
#Ensure the directory of the archive entry exists |
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
# | |
# | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# |
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
Thrift\Exception\TApplicationException thrown with message "Required field 'gatewayId' was not present! Struct: getAllApplicationDeployments_args(gatewayId:null)" | |
Stacktrace: | |
#22 Thrift\Exception\TApplicationException in /var/www/airavata-php-gateway/app/libraries/Airavata/API/Airavata.php:6673 | |
#21 Airavata\API\AiravataClient:recv_getAllApplicationDeployments in /var/www/airavata-php-gateway/app/libraries/Airavata/API/Airavata.php:6639 | |
#20 Airavata\API\AiravataClient:getAllApplicationDeployments in /var/www/airavata-php-gateway/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:211 | |
#19 Illuminate\Support\Facades\Facade:__callStatic in /var/www/airavata-php-gateway/app/libraries/CRUtilities.php:346 | |
#18 Airavata\Facades\Airavata:getAllApplicationDeployments in /var/www/airavata-php-gateway/app/libraries/CRUtilities.php:346 | |
#17 CRUtilities:getBrowseCRData in /var/www/airavata-php-gateway/app/controllers/ComputeResourceController.php:239 | |
#16 ComputeResourceController:browseView in <#unknown>: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
function loadIp($host){ | |
$filepath = "/dev/shm/ipcache"; | |
$ip = gethostbyname($host); | |
$wfile = fopen($filepath, "w"); | |
fwrite($wfile, $ip); | |
fclose($wfile); | |
return $ip; | |
} | |
function getIp($host) |
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
grammar UserAgent; | |
useragent : body; | |
body : bunit | |
| body bunit | |
; | |
bunit : product | |
| COMMENT |
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
public String shieldsquare_IP2Hex(String reqIpAddr) { | |
String hex = ""; | |
String[] part = reqIpAddr.split("[\\.,]"); | |
if (part.length < 4) { | |
return "00000000"; | |
} | |
for (int i = 0; i < 4; i++) { | |
int decimal = Integer.parseInt(part[i]); | |
if (decimal < 16) // Append a 0 to maintian 2 digits for every | |
// number |
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
<!--honeypot example--> | |
<a href="http://trappyfakelink.com"></a> |
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/expect -f | |
set host "host" | |
set password "password" | |
spawn ssh $host | |
expect { | |
"(yes/no)?" { | |
send -- "yes\r" |
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
cat file | ssh -p [port] user@host "cat > remotefile" |
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/expect -f | |
# | |
#credits: http://casual-effects.blogspot.in/2013/05/ssh-with-command-line-password-on-os-x.html | |
set host "host" | |
set password "password" | |
spawn ssh $host | |
expect { |