Skip to content

Instantly share code, notes, and snippets.

View timani's full-sized avatar

Timani Tunduwani timani

View GitHub Profile
@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
@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 / 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.
@timani
timani / Makefile
Created April 17, 2016 04:11 — forked from ericdwhite/Makefile
Example using CURL to access https://www.newsblur.com/api
#
# To use this Makefile:
# 1. Change USER, PASSWORD
#
# 2. Login
# $ make login
# This creates a session file holding an API cookie (tmp/session.newsblur)
#
# 3. Downloads your feeds
# $ make feeds
@timani
timani / update_opsmanager_hostname.sh
Created May 16, 2016 18:02 — forked from mandarjog/update_opsmanager_hostname.sh
After a 1.7+ opsmanager restarts with a new ip address, this script will update it in the database
#!/bin/bash
# After a 1.7+ opsmanager restarts with a new ip address
# ssh into the opsmanager as 'ubuntu' and
# Run this file from the opsmanager as follows
# sudo su -l postgres < thisfile.sh >
# Get the current public ip or hostname from aws metadata
HN=$(curl http://169.254.169.254/latest/meta-data/public-hostname)
@timani
timani / make_github_issue.py
Created May 26, 2016 06:18 — forked from JeffPaine/make_github_issue.py
Make an issue on github using API V3 and Python
import json
import requests
# Authentication for user filing issue (must have read/write access to
# repository to add issue to)
USERNAME = 'CHANGEME'
PASSWORD = 'CHANGEME'
# The repository to add this issue to
REPO_OWNER = 'CHANGEME'
@timani
timani / Git Issue Export for Pivotal
Created May 26, 2016 06:21 — forked from glenbot/Git Issue Export for Pivotal
Export your open issues in github to a pivotal tracker friendly csv for import, requires github2 python api-client
import csv
from github2.client import Github
# api settings for github
git_username = 'your_git_username'
git_api_token = 'your_git_api_token'
git_repo = 'username/repo_name'
# import all issues as this story type
pivotal_story_type = 'Bug'
@timani
timani / README-Template.md
Created September 13, 2016 01:52 — 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.

Prerequisities

@timani
timani / 1_Dockerised_JMeter.md
Created December 3, 2016 19:43 — forked from hhcordero/1_Dockerised_JMeter.md
Dockerized JMeter - A Distributed Load Testing Workflow