Skip to content

Instantly share code, notes, and snippets.

View mehdi89's full-sized avatar

Mehedi Hasan mehdi89

  • TubeOnAI
  • Dhaka, Bangladesh
  • 02:56 (UTC -12:00)
View GitHub Profile
@mehdi89
mehdi89 / install_node_exporter.sh
Last active December 16, 2022 11:34
Install latest node_exporter in ubuntu with one command
wget https://github.com/prometheus/node_exporter/releases/download/v1.5.0/node_exporter-1.5.0.linux-amd64.tar.gz
tar xvzf node_exporter-*.tar.gz
mv node_exporter-*/node_exporter /usr/local/bin/
# Create a node_exporter user
useradd --no-create-home --shell /bin/false node_exporter
# Set the ownership of the node_exporter binary to the node_exporter user
@mehdi89
mehdi89 / change_aws_instance_type.sh
Last active May 6, 2022 06:29
Change AWS instance type from terminal (stop -> change instance type -> start)
echo "instance id: $1"
echo "instance type: $2"
#2>&1 > /dev/null to suppress the cli output
echo "stopping instance"
aws ec2 stop-instances --instance-ids $1 2>&1 > /dev/null
echo "waiting for instance to stop"
aws ec2 wait instance-stopped --instance-ids $1
@miguelmota
miguelmota / setup.config
Last active July 26, 2021 15:42
Elastic Beanstalk NGINX rewrite http to https using .ebextensions
files:
"/etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf":
mode: "000755"
owner: root
group: root
content: |
server {
listen 80;
gzip on;

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>