Skip to content

Instantly share code, notes, and snippets.

shafi shafi-codez

Block or report user

Report or block shafi-codez

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
@shafi-codez
shafi-codez / git-repo-migrate.sh
Last active Aug 2, 2019
Migration from our repo to new repo
View git-repo-migrate.sh
# EXISTING_REPO_NAME=plugins_extractor
git clone ssh://<token>@git-codecommit.us-west-2.amazonaws.com/v1/repos/${EXISTING_REPO_NAME}
cd ${EXISTING_REPO_NAME}
for remote in `git branch -r | grep -v master `; do git checkout --track $remote ; done
git remote -v
git remote rm origin
# ORG_URL = "soma.salesforce"
# Ensure this new repo is created.
@shafi-codez
shafi-codez / tryout.sh
Created Apr 10, 2018
Session 1 : Awesomeness in bash
View tryout.sh
# How to check if the disk is full or not ?
df -h
# Filter files from disk
find . -type f -name "*config.xml"
# Parsing command outputs using jq tool
brew install jq
sfdx force:config:list --json | jq '.'
@shafi-codez
shafi-codez / gist:e625aa5ec8e2f4554aca2967ed3079ff
Last active Aug 24, 2017 — forked from rb2k/gist:8372402
A jenkins script to clean up workspaces on slaves
View gist:e625aa5ec8e2f4554aca2967ed3079ff
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
for (node in Jenkins.instance.nodes) {
View gist:e85ab26851113a278100d42a7d457597
@charset "utf-8";
#main-table {
background-image: url(http://www.focusedsupport.com/blog/content/images/2015/06/docker_jenkins_page-2.png);
}
View Dockerfile
FROM ubuntu:latest
RUN apt-get update -y
RUN apt-get install software-properties-common curl wget nodejs git apt-transport-https -y
RUN add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
RUN wget https://cli-assets.heroku.com/apt/release.key
RUN cat release.key | apt-key add -
RUN apt-get update
RUN wget https://cli-assets.heroku.com/branches/sfdx/5.6.18-c980278/heroku-v5.6.18-c980278-linux-amd64.tar.gz
RUN mkdir -p /usr/local/lib && tar -xvzf heroku-v5.6.18-c980278-linux-amd64.tar.gz -C /usr/local/lib
RUN ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku
@shafi-codez
shafi-codez / makefile
Created Mar 3, 2017
makefile jenkins docker
View makefile
build:
@docker pull jenkins:2.32.2
run:
@docker run -d -p 8080:8080 --name=jenkins-master -v $PWD/jenkins:/var/jenkins_home:z --env JAVA_OPTS="-Xmx8192m" --env JENKINS_OPTS="--handlerCountStartup=100 --handlerCountMax=300" -t jenkins:2.32.2
start:
@docker start jenkins-master
stop:
@docker stop jenkins-master
clean: stop
@docker rm -v jenkins-master
View jenkins-upgrade.sh
# for OSS Version in Ubuntu
sudo wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo deb http://pkg.jenkins-ci.org/debian binary/
echo "deb http://pkg.jenkins-ci.org/debian-stable binary/" >> /etc/apt/sources.list
sudo apt-get install jenkins
# For Cloudbees Version in CentOs
# https://cloudbees.zendesk.com/hc/en-us/articles/219530988-How-to-upgrade-RPM-to-CloudBees-Jenkins-Enterprise
sudo rpm --import http://nectar-downloads.cloudbees.com/nectar/rpm/cloudbees.com.key
sudo wget -O /etc/yum.repos.d/jenkins.repo http://nectar-downloads.cloudbees.com/nectar/rpm/jenkins.repo
View ecs.config
ECS_CLUSTER=default
ECS_ENGINE_AUTH_TYPE=dockercfg
ECS_ENGINE_AUTH_DATA=~/.docker/config.json
AWS_DEFAULT_REGION=us-east-1
ECS_DISABLE_METRICS=true
DOCKER_HOST=unix:///var/run/docker.sock
ECS_LOGLEVEL=info
ECS_LOGFILE=/ecs-agent.log
ECS_DATADIR=/data
ECS_UPDATES_ENABLED=false
View style.css
body{font-family:"Helvetica Neue",sans-serif!important;font-size:13px!important;line-height:20px!important;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8BAMAAADI0sRBAAAAJ1BMVEXr6+vq6urs7Ozp6ent7e3u7u7o6Ojv7+/n5+fw8PDm5ubl5eXx8fETrQmTAAAFhElEQVR4Xi3VTXPjSB0G8H+3XhyYS7dkOZlZDuqW5JjiIqllO9wkuZ0MnGTLNjvsxW/Rbm1xsJ23KYpDHGcWFycyBVSF4hCWYmvZI8UH4MjHol27p9+x357n3yCWtM21tZDDeo3Hk2EA0BtMhrxQNAiwuZR2zbuLmf0ALTR45izN0eD1RwWrgYlEc+sCZWQW83PUaJTtHw9RY3apYFMY+VKIRhPqj9zmFr58T2mb4ctfbRU2AhLKEIud+EXuF6B7V7fdu7TjXXUXimkIeAzu+Q5RSpx72h5ingdDV+Er0BVAJnF+wp999EbtXjgWwelCOAOmiLoQWePL08AHqqeSug6gAvC5A+Ao5h2Yu9X6VaOsEozD8ejr8kOS1fWvy7NSkU0AJXSBiAGaAJPeoNXO4icuWh1FiiMHQpv3ehu0dx9RyfloHtVW8WQ094hiQYBhmg2Tz+Uv20PBcZXw5hyTKsm5Qoug3aj0ZXsNn858VNHgy0VUjzrBl98IxaUF3o57QbriS8Od7k0N34h4wDR8WipOHJAN6s7sB6phbSJ7um9iPqW6n04VdArIr65XUwZR3OrdmW/etqlF2Ju3u4Gi7oD7/RXIeSdD4/s8yR/cv4V5IluKGgfkUCeun9F2Ku1KRzX/t3/XG6i2uVAsNIjfVfC2uhSpyQZiyDt1i5sF78wyBUbwFldPUTga97014buUxcs+Ok6Z3VRsNIia4tcvjAqqXX0hd14wszu54wUTqhilsCqf+xUBTl
@shafi-codez
shafi-codez / charming-scripts
Last active Sep 10, 2015
How To Copy using SCP & Private Key
View charming-scripts
scp -i ~/.ssh/id_rsa sulla@sdi-admin.jenkins.release.in.here.com:/tmp/jenkins.log /tmp/
You can’t perform that action at this time.