Skip to content

Instantly share code, notes, and snippets.

View tosin2013's full-sized avatar

Tosin Akinosho tosin2013

View GitHub Profile
@tosin2013
tosin2013 / Submit Event
Created October 2, 2012 03:14 — forked from bueltge/Submit Event
Submit Event in Frontend of Blog via Template in Theme for Plugin: EVENTS MANAGER EXTENDED
<?php
/*
Template Name: Submit Event
Author: Frank Bueltge
Author URI: http://bueltge.de/
*/
function add_errormessage_style() { ?>
<style type="text/css">
.errormessage { border: 3px solid red; padding: 5px; color: #000; }
@tosin2013
tosin2013 / README-Template.md
Created November 15, 2016 21:03 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@tosin2013
tosin2013 / NOTES.md
Created December 14, 2016 19:19 — forked from DenisIzmaylov/NOTES.md
Step By Step Guide to Configure a CoreOS Cluster From Scratch

Step By Step Guide to Configure a CoreOS Cluster From Scratch

This guide describes how to bootstrap new Production Core OS Cluster as High Availability Service in a 15 minutes with using etcd2, Fleet, Flannel, Confd, Nginx Balancer and Docker.

Content

@tosin2013
tosin2013 / parse_yaml.sh
Created February 28, 2017 14:58 — forked from pkuczynski/parse_yaml.sh
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}
@tosin2013
tosin2013 / gist:8762ca33cc27a740f39f36926b4513c0
Created February 27, 2018 20:14 — forked from bhurlow/gist:3043629
Linux Screen Cheat Sheets
–ctrl a c -> cre­ate new win­dow
–ctrl a A -> set win­dow name
–ctrl a w -> show all win­dow
–ctrl a 1|2|3|… -> switch to win­dow n
–ctrl a ” -> choose win­dow
–ctrl a ctrl a -> switch between win­dow
–ctrl a d -> detach win­dow
–ctrl a ? -> help
–ctrl a [ -> start copy, move cur­sor to the copy loca­tion, press ENTER, select the chars, press ENTER to copy the selected char­ac­ters to the buffer
–ctrl a ] -> paste from buffer
@tosin2013
tosin2013 / gist:700c466ef72b1b75d22c4265b75fb96e
Last active March 1, 2018 17:12 — forked from bhurlow/gist:3043629
Linux Screen Cheat Sheets
–ctrl a c -> cre­ate new win­dow
–ctrl a A -> set win­dow name
–ctrl a w -> show all win­dow
–ctrl a 1|2|3|… -> switch to win­dow n
–ctrl a ” -> choose win­dow
–ctrl a ctrl a -> switch between win­dow
–ctrl a d -> detach win­dow
–ctrl a ? -> help
–ctrl a [ -> start copy, move cur­sor to the copy loca­tion, press ENTER, select the chars, press ENTER to copy the selected char­ac­ters to the buffer
–ctrl a ] -> paste from buffer
@tosin2013
tosin2013 / gist:d9a0068975e46ab69fb8c97bc3de7c99
Created September 5, 2018 19:26 — forked from vladimirtsyupko/gist:10964772
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master
@tosin2013
tosin2013 / gist:43a9a2e9ae407a7334bdaf2b4a93cf1d
Created October 15, 2018 13:52 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@tosin2013
tosin2013 / bosh-cheatsheet.md
Created November 1, 2018 01:22 — forked from allomov-altoros/bosh-cheatsheet.md
BOSH CLI cheatsheet

BOSH command line interface cheatsheet

Introduction

BOSH is a powerful tool to install and manage your deployments. You can find docs on https://bosh.io/docs. Consider using bosh-init tool to install to a cloud of your choice MicroBOSH instance (MicroBOSH is a single VM BOSH installation, it has everything that you need to deploy and manage).

Installing of BOSH CLI

BOSH command line interface is implemented as a ruby gem and can be run on every platform that supports ruby, you'll need to have ruby 2.1.x or higher to run it. To install it you can run gem install bosh_cli and gem update bosh_cli to update to a newer version.