Skip to content

Instantly share code, notes, and snippets.

View kevinawoo's full-sized avatar

Kevin Woo kevinawoo

View GitHub Profile
@kevinawoo
kevinawoo / block_personal_appts
Created February 6, 2018 22:38 — forked from ttrahan/block_personal_appts
Google Apps Script to automatically create, edit and delete events on work calendar for personal calendar events. Instructions on how to set up can be found at https://medium.com/@willroman/auto-block-time-on-your-work-google-calendar-for-your-personal-events-2a752ae91dab
function sync() {
var id="XXXXXXXXXX"; // CHANGE - id of the secondary calendar to pull events from
var today=new Date();
var enddate=new Date();
enddate.setDate(today.getDate()+7); // how many days in advance to monitor and block off time
var secondaryCal=CalendarApp.getCalendarById(id);
var secondaryEvents=secondaryCal.getEvents(today,enddate);
schema: "1"
id: myFirstBareBones
protect: true
metadata:
name: Bare Bone Pippeline Template
description: A generic application bake & tag pipeline.
owner: example@example.com
scopes: [global]
variables:
#!/bin/bash
# git functions
__git_branch_info() {
git for-each-ref --format="%(refname:short) %(upstream:short)" refs/heads | \
while read local remote
do
[ -z "$remote" ] && continue
git rev-list --left-right ${local}...${remote} -- 2>/dev/null >/tmp/git_upstream_status_delta || continue
LEFT_AHEAD=$(grep -c '^<' /tmp/git_upstream_status_delta)
/usr/local/bin/make-completion-wrapper:
#!/bin/sh
# Author.: Ole J
# Date...: 23.03.2008
# License: Whatever
# Wraps a completion function
# make-completion-wrapper <actual completion function> <name of new func.> <alias>
# <command name> <list supplied arguments>
# eg.
@kevinawoo
kevinawoo / ignore_moves.py
Last active September 1, 2015 22:14 — forked from RichardBronosky/ignore_moves.py
git diff ignore moved lines
#!/usr/bin/env python
"""
ignore_moves.py v0.2
Filter relocated lines from a unified diff format stream.
Offered under the terms of the MIT License at github.com
Taken from http://stackoverflow.com/questions/1380333/
"""
import sys
from optparse import OptionParser