Skip to content

Instantly share code, notes, and snippets.

View MeenachiSundaram's full-sized avatar

MeenachiSundaram V MeenachiSundaram

View GitHub Profile
@MeenachiSundaram
MeenachiSundaram / Dockerfile
Created June 17, 2017 18:21
softcover dockerfile
FROM ubuntu:16.04
MAINTAINER MEENACHISUNDARAM V <ms.v@initcron.org>
RUN apt-get update -y && \
apt-get install software-properties-common wget unzip curl ruby-full build-essential zlib1g-dev libz-dev libiconv-hook1 libiconv-hook-dev libcurl4-openssl-dev python-software-properties default-jre default-jdk -y
RUN apt-get install texlive-full -y
RUN add-apt-repository ppa:inkscape.dev/stable -y
@MeenachiSundaram
MeenachiSundaram / grav.conf
Last active January 25, 2018 10:41
grav php configuration for Dockerfile (/etc/php/7.0/fpm/pool.d)
[grav]
user = www-data
group = www-data
listen = /run/php/php7.0-fpm.sock
listen.owner = www-data
listen.group = www-data
@MeenachiSundaram
MeenachiSundaram / domain1
Created January 20, 2018 21:10
grav domain1 nginx configuration
server {
#listen 80;
index index.html index.php;
## Begin - Server Info
root /home/grav/www/domain1;
server_name domain1;
## End - Server Info
## Begin - Index
@MeenachiSundaram
MeenachiSundaram / nginx_grav_startup.sh
Created January 20, 2018 21:59
grav nginx container startup script
#!/bin/bash
# Start the first process
nginx
status=$?
if [ $status -ne 0 ]; then
echo "Failed to start my_first_process: $status"
exit $status
fi
@MeenachiSundaram
MeenachiSundaram / entrypoint.sh
Last active January 25, 2018 10:47
grav docker file with multiple domain entrypoint
#!/bin/bash
for file in $( ls /etc/nginx/sites-available/ )
do
#mkdir -p /home/grav/domains/$file
unzip -q /home/grav/grav-admin.zip -d /tmp/
mv /tmp/*grav* /home/grav/domains/$file
ln -sF /etc/nginx/sites-available/$file /etc/nginx/sites-enabled/$file
done
@MeenachiSundaram
MeenachiSundaram / grep for file with file path and line number.md
Last active February 6, 2018 10:48
How do I find all files containing specific text on Linux using grep?

Checking for the file using pattern match

grep -rnw '/path/to/somewhere/' -e 'pattern'
  • -r or -R is recursive,
  • -n is line number, and
  • -w stands for match the whole word.
  • -l (lower-case L) can be added to just give the file name of matching files.
@MeenachiSundaram
MeenachiSundaram / Readme.md
Last active February 15, 2018 16:46
Screen Cheat Cheet

Functions and Commands

Function Command
New Window ctrl a+c
Set Window name ctrl a+Shift A
Show All Window ctrl a+w
Switch to windows ctrl a+1|2|...n
Choose Window ctrl a+"
Switch between prev Window ctrl a+ctrl a
@MeenachiSundaram
MeenachiSundaram / k8s-user-data.sh
Last active December 27, 2018 06:04 — forked from initcron/k8s-user-data.sh
kubernetes user data script
#!/bin/bash
apt-get update
apt-get install -y git wget
# Install Docker
apt-get install \
apt-transport-https \
ca-certificates \
curl \
@MeenachiSundaram
MeenachiSundaram / startup.sh
Last active May 19, 2025 12:10
startup script for installing docker in GCP
#!/bin/bash
apt-get update
apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
@MeenachiSundaram
MeenachiSundaram / Readme.md
Created October 13, 2018 17:32
docker setup