Skip to content

Instantly share code, notes, and snippets.

Andro Babu rambabusaravanan

Block or report user

Report or block rambabusaravanan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rambabusaravanan / serverless.s3-website.yml
Last active Jan 29, 2019
Serverless Framework CloudFormation Templates
View serverless.s3-website.yml
Type: AWS::S3::Bucket
BucketName: ${self:service}-${self:provider.region}-test-one
- AllowedOrigins: ['*']
AllowedHeaders: ['*']
rambabusaravanan / directory-index.js
Last active May 9, 2020
get S3 Directory Index as JSON
View directory-index.js
// source:
function xmlToJson(xml) {
if (typeof xml === 'string') {
parser = new DOMParser();
xml = parser.parseFromString(xml, 'text/xml');
// Create the return object
var obj = {};
rambabusaravanan / schema-validation.js
Created Jun 15, 2018
jsonschema validation with custom display name
View schema-validation.js
const validate = require('jsonschema').validate;
let schema = {
"type": "object",
"properties": {
"x": {
"display": "X Coordinate", // This is some extra field that we give for our purpose
"type": "number",
"required": true // error says like 'is required'
# Schema Spy
java -jar /usr/local/bin/schemaSpy_5.0.0.jar -dp /home/androbabu/softwares/jar/mysql-connector-java-5.1.28.jar -t mysql -host localhost -db $1 -u root -p password -o .schema
# Git Tree Log
git log --graph --all --pretty=format:"%C(auto)%h%d %s %C(dim)(%an) %aD"
git config --global alias.tree 'log --graph --all --pretty=format:"%C(auto)%h%d %s %C(dim)(%an) %aD"'
git tree

The various approach followed for upload service

rambabusaravanan / detect-react-object.js
Created Mar 12, 2018
Detect React Objects - Components and Elements
View detect-react-object.js
function isClassComponent(component) {
return typeof component === 'function'
&& !!component.prototype.isReactComponent
function isFunctionComponent(component) {
return typeof component === 'function'
// && !!String(component).includes('return React.createElement') // may fails
&& React.isValidElement(Component())
rambabusaravanan /
Created Jan 14, 2018
S3 Bucket image on-demand compression and conversion using AWS Lambda
rambabusaravanan /
Last active May 10, 2020
GitLab CI Configuration YAML

Firebase Deployment

Step 1: Get Token

Generate the firebase token from your terminal using the command $ firebase login:ci

Waiting for authentication...

Success! Use this token to login on a CI server:


rambabusaravanan /
Created Nov 13, 2017
Simple TCP Streaming Server Client in Python
# Streaming Client
import socket
HOST = 'localhost'
PORT = 50007
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
while True:
rambabusaravanan / jailuser
Created Oct 2, 2017
Chroot Jail for SSH / SFTP User in Ubuntu and Debian
View jailuser
if [ "$EUID" -ne 0 ]; then
echo "Requires root permission .."
echo "Usage: 'sudo $0 newusername'"
exit 1
You can’t perform that action at this time.