Skip to content

Instantly share code, notes, and snippets.

@monkut
monkut / SpotifyCassandra-getting-started.md
Last active May 14, 2018 21:05
Using spotify cassandra docker image

https://github.com/spotify/docker-cassandra

getting and starting single-node cassandra

This describes the method to obtain and run the spotify/cassandra single-node instance on ubuntu 16.04 where docker is already installed.

  1. Obtain image
sudo docker pull spotify/cassandra
@monkut
monkut / github_org_projects_info.graphql
Last active June 13, 2018 23:48
A github graphql query to obtain information on originzational projects
query {
organization(login:"your-org-name"){
name
projects(first:25, states:OPEN) {
nodes {
name,
columns(first:10){
nodes{
name,
cards (first:50){
[MASTER]
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS
@monkut
monkut / config.yml
Created June 18, 2018 17:55
WIP - sample circleci django/postgres config
version: 2
jobs:
build:
working_directory: ~/baserepository/
docker:
- image: circleci/python:3.6.5
environment:
PIPENV_VENV_IN_PROJECT: true
- image: mdillon/postgis:9.6
environment:
@monkut
monkut / japanese_business_calendar.py
Created July 11, 2018 14:24
Using pandas AbstractHolidayCalendar to calculate work days
import datetime
from pandas.tseries.holiday import AbstractHolidayCalendar, Holiday, sunday_to_monday, MO
from pandas.tseries.offsets import Day, CustomBusinessDay, DateOffset
class JapanBusinessCalendar(AbstractHolidayCalendar):
rules = [
Holiday('New Years Day', month=1, day=1),
Holiday('Coming of Age Day', month=1, day=8), # second monday of Jan
Holiday('National Foundation Day', month=2, day=11, observance=sunday_to_monday), # observed monday if falls on Sunday
"""
Creates a github organization project with columns from a defined template
using the Github graphql API
"""
import os
import uuid
import requests
@monkut
monkut / ubuntu_18.04_install_and_setup.md
Last active August 17, 2018 01:47
Base install/setup of ubuntu 18.04.1

Install

Setup a big empty partition in ext4 and assign to / root.

Proceed with install

This assumes you have the latest Ubuntu Desktop 18.04 image on a USB key.

Go the iso download and burn key with Etcher

[
{
"name": "category:documentation",
"description": "",
"color": "AED6F1"
},
{
"name": "category:feature",
"description": "",
"color": "5DADE2"
@monkut
monkut / zappa_minimal_attach_policy.json.template
Created October 31, 2018 05:45
A minimal Zappa attach policy with bucket access
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:PutRolePolicy"
],
"Resource": [
@monkut
monkut / github-organizational-project-management.md
Last active January 21, 2019 09:06
My method of development with a team.

Purpose

This page describes how a project is managed using github organizational projects

Project Repository Branch Workflow

github flow is used for development.

When an "Assignee" takes a task, they create a "Feature branch" and develop their code in that branch. When task is complete a PR (Pull Request) is created. A PM or Lead (and relevant project members) reviews the PR, when the PR passes review a PM or Lead will merge the PR into the master branch.