Skip to content

Instantly share code, notes, and snippets.

View iahmad-khan's full-sized avatar
😎
Focusing

Ijaz ahmad iahmad-khan

😎
Focusing
View GitHub Profile
@iahmad-khan
iahmad-khan / tomcat.service
Created October 3, 2017 13:52 — forked from zengxs/tomcat.service
tomcat systemd service script
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
@F21
F21 / gist:08bfc2e3592bed1e931ec40b8d2ab6f5
Last active October 23, 2022 12:36
Minikube RBAC Quick Start
minikube start --kubernetes-version=v1.7.0 --extra-config=apiserver.Authorization.Mode=RBAC
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
minikube dashboard
@ericcitaire
ericcitaire / Vagrantfile
Created November 16, 2016 10:04
OpenStack Vagrant VM
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@paulmaunders
paulmaunders / gist:3e2cbe02c07b6393f7ef0781eed9f97b
Last active May 8, 2019 03:44
Installing VirtualBox and Vagrant on CentOS 7
# Some notes from installing VirtualBox on CentOS 7.
# These exact steps haven't been tested, as I ran them in a different order when manually installing.
# Install dependencies
yum -y install gcc make patch dkms qt libgomp
yum -y install kernel-headers kernel-devel fontforge binutils glibc-headers glibc-devel
# Install VirtualBox
cd /etc/yum.repos.d
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
@zengxs
zengxs / tomcat.service
Last active August 14, 2022 17:26
tomcat systemd service script
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
@chrisfree
chrisfree / drush-s3cmd.sh
Created February 11, 2016 17:41
Backup a Drupal site to Amazon S3 using Drush
# Switch to the docroot.
cd /var/www/yourProject/docroot/
# Backup the database.
drush sql-dump --gzip --result-file=/home/yourJenkinsUser/db-backups/yourProject-`date +%F-%T`.sql.gz
# Switch to the backups directory.
cd /home/yourJenkinsUser/db-backups/
# Store the recently created db's filename as a variable.
@mynameiswhm
mynameiswhm / reindex.sh
Created December 4, 2015 05:18
Bulk reindexing elasticsearch to another cluster using jq
#/bin/bash
if [ $# -lt 3 ]
then
echo "Usage: reindex.sh source_url target_url index [query]"
echo "Example: reindex.sh http://source.com:9200 http://target.com:9200 products_v1 '{\"query\":{\"range\":{\"mod_date\":{\"from\":\"2015-12-03T20:00:00\"}}}}'"
exit 1
fi
SOURCE_URL=$1
@pankajp
pankajp / serve_http.py
Last active February 5, 2024 17:51
Simple Python HTTP Server with multi-threading and partial-content support
#! /usr/bin/env python
# Standard library imports.
from SocketServer import ThreadingMixIn
import BaseHTTPServer
import SimpleHTTPServer
import sys
import json
import os
from os.path import (join, exists, dirname, abspath, isabs, sep, walk, splitext,
@aussielunix
aussielunix / .gitignore
Last active April 12, 2018 17:37
jenkins configs to github
*
!/.gitignore
!/*.xml
!/nextBuildNumber
!/jobs
!/jobs/*
!/jobs/*/*.xml
/jobs/*/disk-usage.xml
/jobs/*/builds