Skip to content

Instantly share code, notes, and snippets.

@nekwebdev
nekwebdev / chocodots.sh
Last active August 20, 2023 06:32
Initialize bare git repository and pull from a github, use --dots https://url.git
#!/usr/bin/env bash
# https://gist.github.com/nekwebdev/906521db55aaa05fcbb6cfa31d7a624e
# @nekwebdev
# LICENSE: GPLv3
#
# chocodots.sh
#
# script to create a local gitbare repository and pull from a bare github repository.
#
set -e
#!/bin/bash
############################################################################
## ██╗ ██████╗ █████╗ ███████╗███████╗ ███████╗███████╗██╗ ██╗ ##
## ██║ ██╔══██╗██╔══██╗██╔════╝██╔════╝ ██╔════╝██╔════╝██║ ██║ ##
## ██║ ██████╔╝███████║███████╗███████╗█████╗███████╗███████╗███████║ ##
## ██║ ██╔═══╝ ██╔══██║╚════██║╚════██║╚════╝╚════██║╚════██║██╔══██║ ##
## ███████╗██║ ██║ ██║███████║███████║ ███████║███████║██║ ██║ ##
## ╚══════╝╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ##
############################################################################
## Preparation:
color() {
color-usage() {
cat <<"USAGE"
Usage: color [OPTIONS] <color>
-b|--bold for bold text
-i|--italic for italic text
-u|--underline for underlined text
-f|--flash for blinking text, not possible together with --bg
-r|--reverse to switch fg and bg colors
-/--bg <color> for background color
color() {
color-usage() {
cat <<"USAGE"
Usage: color [OPTIONS] <color>
-b|--bold for bold text
-i|--italic for italic text
-u|--underline for underlined text
-f|--flash for blinking text, not possible together with --bg
-r|--reverse to switch fg and bg colors
-/--bg <color> for background color
#!/bin/bash
# This script is to create users for a web server setup using this guide:
# https://coderwall.com/p/zxffsg
# The script will prompt for information as it goes.
source ${ZDOTDIR-$HOME}/.bash/color.bash
# Get the server's IP
ip=$(hostname -i)
info="$(color -b blue)*$(color)"
#!/usr/bin/env bash
# Configurable variables
database='vagrant'
username='vagrant'
password='vagrant'
echo ''
echo ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
echo ' Bootstrapping Ubuntu Precise 32bit for Laravel 4'
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Configure your Laravel 4 project for this virtual machine
#
# 1- Add this environment in your project's start.php file:
#
# bootstrap/start.php:
# $env = $app->detectEnvironment(array(
# 'vagrant' => array('vagrant-laravel4')