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
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
/** | |
* Created by Vignesh on 26-05-2015. | |
*/ | |
public class ContainsTest { | |
public static void main(String[] args) { |
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
<?php | |
/** | |
* Usage: | |
* Paste a gist link into a blog post or page and it will be embedded eg: | |
* https://gist.github.com/2926827 | |
* | |
* If a gist has multiple files you can select one using a url in the following format: | |
* https://gist.github.com/2926827?file=embed-gist.php | |
*/ |
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
import java.io.IOException; | |
import java.net.Socket; | |
import java.net.SocketException; | |
import java.net.UnknownHostException; | |
/** | |
* Created by Vignesh on 26-05-2015. | |
*/ | |
public class PortOpenTest { |
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
import com.asvignesh.common.MyException; | |
import com.vmware.vim25.DatastoreHostMount; | |
import com.vmware.vim25.HostScsiDisk; | |
import com.vmware.vim25.VmfsDatastoreExpandSpec; | |
import com.vmware.vim25.VmfsDatastoreOption; | |
import com.vmware.vim25.mo.*; | |
import java.rmi.RemoteException; | |
/** |
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
using System; | |
using System.Management.Automation; | |
namespace SamplePsModule | |
{ | |
[Cmdlet(VerbsCommon.Get, "Vignesh")] | |
public class SampleGet : Cmdlet //Must inherit Cmdlet | |
{ | |
//Parameters | |
[Parameter(Mandatory = true)] |
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 | |
mysql -u <user> -p<Password> -e 'unlock tables;' | |
if [ $? -gt 0 ]; then | |
echo "Failed running mysql unfreeze" | |
exit 1 | |
else | |
echo "success" | |
exit 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
$ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data |
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
Options: | |
--all Show all metadata information for this host (also default). | |
-a/--ami-id The AMI ID used to launch this instance | |
-l/--ami-launch-index The index of this instance in the reservation (per AMI). | |
-m/--ami-manifest-path The manifest path of the AMI with which the instance was launched. | |
-n/--ancestor-ami-ids The AMI IDs of any instances that were rebundled to create this AMI. | |
-b/--block-device-mapping Defines native device names to use when exposing virtual devices. | |
-i/--instance-id The ID of this instance | |
-t/--instance-type The type of instance to launch. For more information, see Instance Types. | |
-h/--local-hostname The local hostname of the instance. |
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
from datetime import datetime, timedelta, timezone | |
import boto3 | |
class Ec2Instances(object): | |
def __init__(self, region): | |
print("region "+ region) | |
self.ec2 = boto3.client('ec2', region_name=region) | |
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
package viewmodel; | |
import play.mvc.QueryStringBindable; | |
import java.util.Map; | |
import java.util.Optional; | |
public class PaginationParams implements QueryStringBindable<PaginationParams> { | |
private int page; | |
private int offset; |
OlderNewer