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
#!/bin/bash | |
JENKINS_URL="http://jenkins" | |
JENKINS_USER="username" | |
JENKINS_TOKEN="username_generate_token" | |
JOB_NAME="job/birolTestJob" | |
JENKINS_AUTH="$JENKINS_USER:$JENKINS_TOKEN" |
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
class Solution: | |
def firstUniqChar(self, s: str) -> int: | |
sdict = {} | |
count = 0 | |
arr = [] | |
for i in s: | |
arr.append(i) | |
if i in sdict: | |
sdict[i] = sdict[i] + 1 | |
else: |
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
brew install helm | |
helm repo add stable https://kubernetes-charts.storage.googleapis.com/ | |
helm repo update | |
kubectl create ns airflow | |
helm install airflow stable/airflow -f values.yaml --version 7.2.0 -n airflow |
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
#!/bin/bash | |
REGION="ap-southeast-1" | |
get_ip=$(curl -s curl http://169.254.169.254/latest/meta-data/local-ipv4) | |
echo "Node IP : $get_ip" | |
sudo sed -i "s/INET_DIST_INTERFACE=.*/INET_DIST_INTERFACE={$get_ip}/g" /opt/ejabberd/conf/ejabberdctl.cfg | |
sudo sed -i "s/ERLANG_NODE=ejabberd@.*/ERLANG_NODE=ejabberd@$get_ip/g" /opt/ejabberd/conf/ejabberdctl.cfg | |
sudo rm -rf /opt/ejabberd/database/* | |
export HOME=/root |
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
## sqlite_bck.py | |
import datetime | |
import os | |
import string | |
import tarfile | |
import shutil | |
import boto # you need to install "boto" == 'sudo pip install boto' | |
from boto.s3.connection import S3Connection | |
from boto.s3.key import Key | |
from datetime import timedelta |
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
'use strict'; | |
var AWS = require('aws-sdk'), | |
transcoder = new AWS.ElasticTranscoder({ | |
apiVersion: '2012-09-25', | |
region: 'ap-south-1' | |
}); | |
exports.handler = (event, context, callback) => { | |
let fileName = event.Records[0].s3.object.key; | |
var srcKey = decodeURIComponent(event.Records[0].s3.object.key.replace(/\+/g, " ")); | |
var newKey = fileName.split('.')[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
#!/bin/bash | |
red=$'\e[1;31m' | |
grn=$'\e[1;32m' | |
yel=$'\e[1;33m' | |
blu=$'\e[1;34m' | |
mag=$'\e[1;35m' | |
cyn=$'\e[1;36m' | |
end=$'\e[0m' |
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
[program:jamahook-packages] | |
directory=/services/jamahook_xpx_sndlk_services_lnx | |
command=bash /app/run.sh & | |
autostart=true | |
autorestart=false | |
stderr_logfile=/var/log/app.err.log | |
stdout_logfile=/var/log/app.out.log |
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
#!/bin/bash | |
export docker_server=https://AWS_ACCOUNT_ID.dkr.ecr.eu-central-1.amazonaws.com | |
export token=$(aws ecr get-authorization-token --query authorizationData[].authorizationToken --output text | base64 -d | cut -d: -f2) | |
#export login=`echo $aws_login` | |
#$login | |
docker login -u AWS -p $token $docker_server |
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
import os, sys | |
# wget -O - https://gist.githubusercontent.com/ratulbasak/9bcb9dfa13b7f68f0af03d0201eed279/raw/4c0101d7eeb5d353b0a2314b24c0f51cca1bf315/docker_cp.py | python | |
Project_ROOT = 'src' | |
ADAPTERS_FOLDER = "maindir" | |
directories = os.walk(os.getcwd()+'/'+Project_ROOT).next()[1] | |
def copy_from_docker(CONTAINER_NAME): | |
for dir in directories: |
NewerOlder