Skip to content

Instantly share code, notes, and snippets.

View svedova's full-sized avatar

Savas Vedova svedova

View GitHub Profile
@svedova
svedova / dsnmasq.sh
Created August 3, 2024 08:20
dnsmasq.sh
#!/usr/bin/env bash
# In order to run this script use:
# $ bash scripts/dnsmasq.sh
# Install dnsmasq
brew install dnsmasq
# Create config folder if it doesn’t already exist
mkdir -pv $(brew --prefix)/etc/
@svedova
svedova / install-nginx-ssl.bash
Created July 8, 2017 23:31
Install nginx and configure letsencrypt
#!/bin/bash
# Exit on error
set -e
echo "Hello, what is your app name?"
read appname
# slugify the app name
appslug="$(echo $appname | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z)"
@svedova
svedova / install-prod-env.bash
Last active July 8, 2017 23:19
Setting up a Django App with nginx, gunicorn and less compiler
#!/bin/bash
# Exit on error
set -e
echo "Hello, what is your app name?"
read appname
# slugify the app name
appslug="$(echo $appname | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z)"
@svedova
svedova / www-perms.bash
Last active June 15, 2017 13:04
Running this bash script will create a var/www folder to host different projects in a Ubuntu environment. It will also set the permissions properly for the current user and www group.
#!/bin/bash
# run this file with sudo permissions, example:
# bash www-perms.bash <group-name> <username>
echo "Creating group if it is not there..."
getent group $1 || groupadd $1
echo "Adding user $2 to group..."
usermod -a -G $1 $2