Skip to content

Instantly share code, notes, and snippets.

View shankscoder's full-sized avatar

Ashwin Shankar shankscoder

View GitHub Profile
@shankscoder
shankscoder / Caddyfile
Created July 4, 2023 06:47
Sample Dockerized Unifi Controller Setup
<fqdn>:8843 {
tls <email>
encode gzip
reverse_proxy unifi-controller:8843 {
transport http {
tls
tls_insecure_skip_verify
}
@shankscoder
shankscoder / arm-amazonlinux-docker-installer.sh
Last active October 14, 2024 19:46
Multi-Arch Ubuntu Docker Installers... with agnostic Docker installer
#!/bin/bash
# SSM user didn't start in home dir, so go there
cd
curl https://gist.github.com/shankscoder/67401d7a36e712b51db9766b97901223/raw/5bf906ef0d1b0d7fc351a3da42a7ce51471a145d/swap-awslinux.sh | sudo bash
sudo yum install docker containerd git screen -y
sleep 1
wget https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)
sleep 1
sudo mv docker-compose-$(uname -s)-$(uname -m) /usr/libexec/docker/cli-plugins/docker-compose
sleep 1
@shankscoder
shankscoder / swap-awslinux.sh
Last active February 25, 2025 07:36
Shell script for adding swap to Linux
#!/bin/bash
# Run as root
echo "Preparing 2GB Swap"
# size of swapfile in megabytes
swapsize=2048
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
@shankscoder
shankscoder / docker-compose.yml
Created April 26, 2016 14:24 — forked from discoposse/docker-compose.yml
GlusterFS Docker Compose sample
glusterfs-server:
image: rancher/glusterfs:v0.1.3
devices:
- /dev/fuse:/dev/fuse:rwm
cap_add:
- SYS_ADMIN
volumes_from:
- glusterfs-data
labels:
io.rancher.container.hostname_override: container_name
@shankscoder
shankscoder / rancher-compose.yml
Created April 26, 2016 14:24 — forked from discoposse/rancher-compose.yml
GlusterFS Rancher Compose sample
.catalog:
name: "GlusterFS"
version: "3.7.5-rancher1"
description: "Gluster FS (2x) replicated volume"
uuid: glusterfs-0
questions:
- variable: "VOLUME_NAME"
description: "Name to give the Gluster volume"
label: "Volume Name"
required: true

Responsive Mail UI ('-' * 18) Credit for design goes to Vivek Venkatraman: http://dribbble.com/shots/1455744-Email-Concept/

Check it out in full view to see it's responsiveness. It's responsive until pretty darn small but i haven't actually tested it on mobile devices. Tested in IE9+, latest Chrome and Firefox.

I've noticed the message (slide-in section) is some times visible on page load. If that's the case just reload the page, that's a browser bug.

A Pen by Nicklas Sandell on CodePen.

Responsive Mail UI ('-' * 18) Credit for design goes to Vivek Venkatraman: http://dribbble.com/shots/1455744-Email-Concept/

Check it out in full view to see it's responsiveness. It's responsive until pretty darn small but i haven't actually tested it on mobile devices. Tested in IE9+, latest Chrome and Firefox.

I've noticed the message (slide-in section) is some times visible on page load. If that's the case just reload the page, that's a browser bug.

A Pen by Nicklas Sandell on CodePen.

@shankscoder
shankscoder / nginx-naxsi_install.md
Last active August 29, 2015 14:07
Instructions to replace NGINX with NGINX+NAXSI on Ubuntu 14.04

Assuming a standard NGINX setup on Ubuntu 14.04

As a user with sudo rights

  • Stop nginx first
sudo nginx stop
@shankscoder
shankscoder / Assorted Ponderables
Created April 8, 2014 05:44
Assorted collection of profound, poignant, memorable, quotable ponderables collected from all over
# 1. He who knows (not) ...
He who knows not and knows not that he knows not, is a fool - shun him
He who knows not and knows he knows not, He is simple - teach him;
He who knows and knows not he knows, He is asleep - wake him;
He who knows and knows he knows, He is wise; follow him.
- Unknown
-------
@shankscoder
shankscoder / ec2login.sh
Created February 2, 2012 06:56 — forked from brahmana/ec2login.sh
ec2login - A simple bash script to securely login to an EC2 instance machine via SSH sitting behind NAT
#!/bin/bash
# NOTE : This is a very rudimentary and dumb script. With little more work this can be made to accept
# command line arguments which override those specified in the setup.sh file
public_ip_file='/tmp/public_ip_address'
first_arg=$1
fetch_public_ip() {
echo "Fetching public ip address from automation.whatismyip.com service"