Skip to content

Instantly share code, notes, and snippets.

@ravituvar
ravituvar / CloudfrontRedirectorS3Lambda.js
Created July 6, 2018 04:30
Redirect to index.html pages in subdirectories when hosting Static html on S3 and Distributed via cloudfront
'use strict';
exports.handler = (event, context, callback) => {
function getFileExtension(filename) {
return filename.slice((filename.lastIndexOf(".") - 1 >>> 0) + 2);
}
// Extract the request from the CloudFront event that is sent to Lambda@Edge
var request = event.Records[0].cf.request;
var extension = getFileExtension(request.uri.substr(request.uri.lastIndexOf('/') + 1));
console.log(extension);
@ravituvar
ravituvar / README.md
Created October 1, 2018 11:56 — forked from vjm/README.md
Install DevOps applications as Docker Images and auto-start
  • bash <(curl -s https://gist.githubusercontent.com/vjm/fea77232e2bd6bb49f24/raw/jenkins-setup.sh)
  • bash <(curl -s https://gist.githubusercontent.com/vjm/fea77232e2bd6bb49f24/raw/jenkins-update.sh)
  • bash <(curl -s https://gist.githubusercontent.com/vjm/fea77232e2bd6bb49f24/raw/elk-setup.sh)
  • bash &lt;(curl -s https://gist.githubusercontent.com/vjm/fea77232e2bd6bb49f24/raw/elk-update.sh)
@ravituvar
ravituvar / aws.txt
Created October 17, 2018 08:51 — forked from anjijava16/aws.txt
http://www.devopsschool.com/tutorial/aws/
https://www.youtube.com/watch?v=uJssXPyMf0s&list=PLxzKY3wu0_FKasqIn1MdmhbT1y4aLqNUO
https://hortonworks.com/blog/5-ways-make-hive-queries-run-faster/
https://www.youtube.com/watch?v=wTK2CKth3DE (HTTP WebServer Setup)
https://linuxacademy.com/howtoguides/posts/show/topic/14209-automating-aws-with-python-and-boto3
@ravituvar
ravituvar / Free_Beyond_Compare.md
Created October 31, 2018 11:17 — forked from njleonzhang/Free_Beyond_Compare.md
Free Beyond Compare by unlimited trail

1 . goto beyond compare folder

 cd "/Applications/Beyond Compare.app/Contents/MacOS/"

2 . rename BCompare to BCompare.real

 mv BCompare BCompare.real
@ravituvar
ravituvar / odoo@10CE_from_src.sh
Created November 28, 2018 12:01 — forked from Pelirrojo/odoo@10CE_from_src.sh
Install & run an odoo v10 Community Edition, in a Debian/distro by console without database Raw
#!/usr/bin/env bash
# https://www.getopenerp.com/install-odoo-10-on-ubuntu-16-04/
# Update & upgrade distro status
sudo apt-get update -s
sudo apt-get upgrade -s
# Install dev deps
sudo apt-get install -s git make gcc curl poppler-utils mc bzr lptools antiword
sudo apt-get install -s postgresql-client postgresql-client-common
@ravituvar
ravituvar / crack-with-navicat-keygen.sh
Created December 13, 2018 09:24 — forked from zthxxx/crack-with-navicat-keygen.sh
crack navicat premuim 12.04 with navicat-keygen
# make sure exist a keychain identity preference named "crack-for-navicat"
# ref: https://github.com/DoubleLabyrinth/navicat-keygen/tree/mac
# to gen a identity,
# https://support.apple.com/kb/PH7173?locale=en_US
# set the Name: crack-for-navicat
# set the Certificates Type: Code Signing
# after created, you need always trust this identity,
# then you can use this commad under to check:
# security find-identity -vp codesigning
#!/bin/bash
export LANG="en_US.UTF-8"
rm -Rf ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat*
rm -Rf ~/Library/Caches/com.prect.NavicatPremium
rm -Rf ~/Library/Preferences/com.prect.NavicatPremium.plist
sudo rm -Rf /Applications/Navicat\ Premium.app/
key gen : NAVN-AUQL-LP2V-3GAJ
request code :
o3oHEuwvhh7v+A6TLNtma5KLZ55NHaj+RM9q/Th9FzsBJuwRWIf30ZqRFzhaHdPKyX8wMH+IENxrzetMa1egQLU11okKTpWJnkpBPJ7mpzRYF6pntD81ffxXuOZDuhuUruvGZNRtwJVpvckuYpH1BJgDP+xfprftjSGjxpOzyyNXu14gXEdWpsj4Z616WNfaPqwXcEIHKx4Xw64Bb6oT6NeT22SuWlKX7bLCU7jStjFPoziw
activation code:
IaBiNBLlJi40BYfmC8+bt2+y6fEBCLEPS9sngItbIsH+w/akZGWssMqLCxNkF/eXpoKgIJ6DH4KNoxhtR1PToWWw863yInFTMbv4WBnwxEN3hemyvxqTHLda6oskxFH3tg+qkEFAfOC7FalnFn/J+2lg71GQssZsKMxHn+JonsC+K3al2IU4lNga7sFE41La58NL/lZh2VidNwp1fAAFIadtjwLtvYaRJbbjdxOW9PGPbAJTEvQb2UnMyeyIdDWx9m1b232rAKMSI5fqkO9RLu48FkadwAZA0QrvZ1FYKIwKn+9g6r0lmNfTOUcRIAR2cEV/jQmz9khvd+V81+RGxw==
#!/bin/bash
#Configuring postfix to use aws ses as a gateway.
#https://gist.github.com/JohnMorales/d554e227146735217536462141fc6898
#update via `gist -u d554e227146735217536462141fc6898 config_mail.sh`
# Configuring postfix.
if [ -z "$AWS_ACCESS_KEY_ID" ]; then
echo "Must have AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY set"
exit 1
fi
@ravituvar
ravituvar / receving-mail-server.json
Created December 18, 2018 17:11 — forked from mechamogera/receving-mail-server.json
メール受信環境を構築するCloudFormationテンプレート
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Mail server for receiving",
"Parameters" : {
"MailServerDomain" : {
"Type" : "String",
"Default" : "mail.example.com",
"Description" : "mail server domain"
},