openssl x509 -in stackexchangecom.crt -text -noout
openssl x509 -in cert.pem -text -noout
openssl x509 -inform der -in foobar.cer -noout -text
| #!/bin/bash | |
| ## your repo path from where you need to run script | |
| SOURCE_PATH=/Applications/XAMPP/htdocs/bitbucket | |
| CUREENT_PATH=`pwd` | |
| BRANCH=master | |
| ## gitlab repo path where you want to copy changes only | |
| GITLAB_REPO_PATH=/Applications/XAMPP/xamppfiles/htdocs/hdfcforex | |
| #default branch |
| STEPS to CREATE sftp | |
| # generate key | |
| ssh-keygen | |
| #Configure an SSH/SFTP User for Your Key | |
| #add public key in below path | |
| .ssh/authorized_keys | |
| To Create a SFTP server for user to login and access particular folder |
| #!/bin/bash | |
| # Assumes SSH is setup already with publickey authentication, i.e. | |
| # PubkeyAuthentication yes | |
| # PasswordAuthentication no | |
| if [ "$EUID" -ne 0 ] | |
| then echo "Please run with sudo" | |
| exit | |
| fi |
| #!/bin/bash | |
| if [ "$EUID" -ne 0 ] | |
| then echo "Please run with sudo" | |
| exit | |
| fi | |
| read -p 'Enter sftp username to create: ' username | |
| echo Creating user account for $username | |
| adduser $username --shell /sbin/nologin | |
| read -p 'Enter sftp password to create: ' password | |
| echo "$username:$password" | chpasswd |
| /* | |
| CryptoJS v3.1.2 | |
| code.google.com/p/crypto-js | |
| (c) 2009-2013 by Jeff Mott. All rights reserved. | |
| code.google.com/p/crypto-js/wiki/License | |
| */ | |
| var CryptoJS=CryptoJS||function(a,m){var r={},f=r.lib={},g=function(){},l=f.Base={extend:function(a){g.prototype=this;var b=new g;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, | |
| p=f.WordArray=l.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=m?b:4*a.length},toString:function(a){return(a||q).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var j=0;j<a;j++)b[c+j>>>2]|=(d[j>>>2]>>>24-8*(j%4)&255)<<24-8*((c+j)%4);else if(65535<d.le |
| import boto3 | |
| region = 'us-west-1' | |
| def get_instance_ids(type): | |
| # create ec2 resource object to get all info about ec2 | |
| ec2 = boto3.resource('ec2') | |
| instance_ids = [] | |
| # define tag you want to perform action on it | |
| tags = ['stag-test'] | |
| # it will give you only running instance |