Skip to content

Instantly share code, notes, and snippets.

View kirschbaum's full-sized avatar

Nathan Kirschbaum kirschbaum

View GitHub Profile
@kirschbaum
kirschbaum / block_personal_appts
Created January 9, 2019 16:49 — 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);

Keybase proof

I hereby claim:

  • I am kirschbaum on github.
  • I am kirschbaum (https://keybase.io/kirschbaum) on keybase.
  • I have a public key ASCCyNqa6Zrer5c39KM7YUxRVKwFTjVHcUXiZjxDiG9TvAo

To claim this, I am signing this object:

@kirschbaum
kirschbaum / angular_watch_count.js
Created October 26, 2015 15:32
Angular Watch Counter
function showWatchers()
{
var root = angular.element(document.getElementsByTagName('body'));
var watchers = [];
var f = function (element) {
angular.forEach(['$scope', '$isolateScope'], function (scopeProperty) {
if (element.data() && element.data().hasOwnProperty(scopeProperty)) {
angular.forEach(element.data()[scopeProperty].$$watchers, function (watcher) {
@kirschbaum
kirschbaum / app.js
Last active December 4, 2020 16:18 — forked from victorb/app.js
var myApp = angular.module('myApp', []);
myApp.directive('googleplace', function() {
return {
require: 'ngModel',
scope: {
ngModel: '=',
details: '=?'
},
link: function(scope, element, attrs, model) {
config.vm.synced_folder "~/.ssh", "/home/vagrant/.ssh"
config.vm.synced_folder "~/.drush", "/home/vagrant/.drush"
config.vm.synced_folder "mysql", "/var/lib/mysql"
include_recipe "apt"
include_recipe "openssl"
include_recipe "apache2"
include_recipe "apache2::mod_php5"
include_recipe "apache2::mod_rewrite"
include_recipe "apache2::mod_deflate"
include_recipe "apache2::mod_headers"
include_recipe 'php'
include_recipe "php::module_apc"
include_recipe "php::module_memcache"
@kirschbaum
kirschbaum / .zshrc
Last active December 14, 2015 13:49
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="gallois"
# Example aliases