Skip to content

Instantly share code, notes, and snippets.

View DevOps-Emre's full-sized avatar
🏠
Working from home

Emre DevOps-Emre

🏠
Working from home
View GitHub Profile
@DevOps-Emre
DevOps-Emre / app.yaml
Created September 12, 2021 10:17 — forked from akhenakh/app.yaml
Example of graceful shutdown with grpc healthserver * httpserver
readinessProbe:
exec:
command: ["/root/grpc_health_probe", "-addr=:6666"]
initialDelaySeconds: 1
livenessProbe:
exec:
command: ["/root/grpc_health_probe", "-addr=:6666"]
initialDelaySeconds: 2
imagePullPolicy: IfNotPresent
@DevOps-Emre
DevOps-Emre / fibonacci.sh
Created August 31, 2021 20:58 — forked from lazyakshay/ fibonacci.sh
shell script to generate fibonacci series
#!/bin/bash
c=2
a=1
b=1
d=0
echo "enter the number of elements"
read n
echo "$a"
echo "$b"
while((c<n))
@DevOps-Emre
DevOps-Emre / fibonacci.sh
Created August 31, 2021 20:58 — forked from lazyakshay/ fibonacci.sh
shell script to generate fibonacci series
#!/bin/bash
c=2
a=1
b=1
d=0
echo "enter the number of elements"
read n
echo "$a"
echo "$b"
while((c<n))
@DevOps-Emre
DevOps-Emre / tests_for_toptal_on_codility.py
Created August 25, 2021 07:52 — forked from 1st/tests_for_toptal_on_codility.py
My answers for tests on http://codility.com that I passed for company http://toptal.com I use Python language to solve problems.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Test that I passed on codility.com for TopTal company
#
# Task #1
def binary_gap(N):
@DevOps-Emre
DevOps-Emre / NginxRedirect.md
Created July 26, 2021 20:10 — forked from esfand/NginxRedirect.md
Nginx Redirect

Redirect: Temporary and Permanent

Source

What is an HTTP Redirect?

HTTP redirection, or URL redirection, is a technique of pointing one domain or address to another. There are many uses for redirection, and a few different kinds of redirection to consider.

As you create content and administrate servers, you will often find the need to redirect traffic from one place to another. This guide will discuss the different use-cases for these techniques, and how to accomplish them in Apache and Nginx.

@DevOps-Emre
DevOps-Emre / linux_fun.md
Created June 10, 2021 17:25 — forked from zlorb/linux_fun.md
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Install figlet [3] via : sudo apt-get install figlet
  4. Make sure you have Ruby installed via : ruby -v
  5. Install the lolcat [2] via : gem gem install lolcat
  6. (option) Add to .bash_profile and/or .bashrc
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help
@DevOps-Emre
DevOps-Emre / postgres-cheatsheet.md
Created May 28, 2021 08:05 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)