Skip to content

Instantly share code, notes, and snippets.

View seshness's full-sized avatar

Seshadri Mahalingam seshness

View GitHub Profile
@seshness
seshness / HowToSharedRepoModelOnGitHub.md
Created October 24, 2012 01:45
Shared Repository Model for Pull Requests and Code Review

The Shared Repository Model

$ git clone [email protected]:berkeley-food-recommendations/data-gathering.git

You're cloning the main repository - be careful! We're going to enforce a "no committing to master directly" rule, so no committing directly to master, please.

Short Version

@seshness
seshness / Turn ⇪ into ⌃ on a Mac
Last active December 13, 2015 21:08
Make your Caps Lock key a Control key
on caps_lock_to_control()
tell application "System Preferences"
tell application "System Events" to tell process "System Preferences" to tell window "Keyboard"
click pop up button "Caps Lock (⇪) Key:" of sheet 1
click menu item "⌃ Control" of menu 1 of pop up button "Caps Lock (⇪) Key:" of sheet 1
end tell
end tell
end caps_lock_to_control
tell application "System Preferences"
@seshness
seshness / Forced unwrapping causes errors elsewhere.swift
Created August 19, 2014 17:02
Causes an error in the playground, which is expected. What's unexpected is the line on which the error occurs.
// Playground - noun: a place where people can play
import Cocoa
var str:String? = "Hello, playground"
str = nil
if let actualStr = str {
println(str)
@seshness
seshness / .block
Last active April 5, 2016 07:02
Guess the Legend
license: bsd-3-clause
height: 700
sudo chmod 755 /usr/lib/hdinsight-common/certs/
sudo chmod 744 /usr/lib/hdinsight-common/certs/key_decryption_cert.prv
@seshness
seshness / SyncEvents.gs
Created April 12, 2022 07:31
Syncs your personal calendar with your work calendar as 'busy' events
/**
* Syncs your personal calendar with your work calendar as 'busy' events.
*/
// WARNING: This script has the potential to delete events! Audit the code and run with care.
// The script *should* only delete events it has previously created, but bugs are possible!
// How to use
// ==========
// 1. Share your personal calendar with your work account using the free/busy option.