Skip to content

Instantly share code, notes, and snippets.

View timani's full-sized avatar

Timani Tunduwani timani

View GitHub Profile
@timani
timani / Makefile
Created April 16, 2016 05:13 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
# docker run -i -t alpine sh
# Check if curl is enabled
/ # curl --version
sh: curl: not found
# Run an apk update
/ # apk update
fetch http://dl-4.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch http://dl-4.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
@timani
timani / alextemplate.txt
Created December 6, 2015 07:22 — forked from bellebethcooper/alextemplate.txt
Template 2 for creating a blog post by Belle Beth Cooper
# WORKING TITLE
summary text
intro
## SET UP
- what happened?
- why is it relevant?
@timani
timani / dirsrv.conf
Created December 3, 2015 00:14
Ryslog conf for php-error.log, php-slow.log, nginx-access.log and the nginx-error.log files. Generated by the rsyslog Configuration Builderhttp://www.rsyslog.com/rsyslog-configuration-builder/
# Default Settings
# /etc/rsyslog.d/dirsrv.conf
# Load Modules
module(load="imfile")
module(load="imuxsock")
# rsyslog Templates
# rsyslog Input Modules
input(type="imfile"
@timani
timani / relations.py
Created November 23, 2015 06:35 — forked from cyrexcyborg/relations.py
Flask-Admin-SQLAlchemy one-to-one, one-to-many between two tables
# -*- coding: utf-8 -*-
# Many thanks to http://stackoverflow.com/users/400617/davidism
# This code under "I don't care" license
# Take it, use it, learn from it, make it better.
# Start this from cmd or shell or whatever
# Go to favourite browser and type localhost:5000/admin
import sys
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.admin import Admin
vagrant provision
==> default: Running provisioner: ansible...
PYTHONUNBUFFERED=1 ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_FORCE_COLOR=true ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o IdentityFile=/home/timani/Ansible/ansible-boilerplate/.vagrant/machines/default/virtualbox/private_key -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --user=vagrant --connection=ssh --timeout=30 --limit='all' --inventory-file=beta-development --extra-vars={"ansible_ssh_user":"dev.e96c3b83-70dc-46b8-946d-478f4369938f"} -vvvv site.yml

PLAY [all] ******************************************************************** 

GATHERING FACTS *************************************************************** 
<appserver.dev.e96c3b83-70dc-46b8-946d-478f4369938f.drush.in> ESTABLISH CONNECTION FOR USER: dev.e96c3b83-70dc-46b8-946d-478f4369938f
<appserver.dev.e96c3b83-70dc-46b8-946d-478f4369938f.drush.in> REMOTE_MODULE setup
@timani
timani / api.md
Last active October 4, 2015 21:30

Base commands

Verb	Path	Action	Route Name
GET	/build	index	base.index
GET	/install	install	base.install 

Site commands

// Install dependencies and create directories
endpoint
endpoint.name
endpoint.host
endpoint.user
endpoint.password
endpoint.port
endpoint.logs
endpoint.getEndpointLog(endpointLog)
endpoint.getEndpointLogs()
# https://www.npmjs.com/package/gulp-prompt
mitre
mitre.init(user, site) // prompt user to create a logger
class Site {
constructor(uuid, name) {
this.uuid = uuid;
this.name = name;
}
function getEnvironment(environment) {
// 1.
}