Skip to content

Instantly share code, notes, and snippets.

View aculich's full-sized avatar
😀
Having fun exploring repos for Computational Text Analysis with D-Lab CTAWG

Aaron Culich aculich

😀
Having fun exploring repos for Computational Text Analysis with D-Lab CTAWG
View GitHub Profile
@bpmore
bpmore / sort-tabs.txt
Created June 9, 2016 17:41
Sort Tabs in Google Spreadsheets
1. Copy/Paste the information below to the clipboard
2. Open the spreadsheet whose sheets need to be alphabetised
3. Choose Tools > Script editor > Blank (this opens a new tab in the browser)
4. Press Control+A followed by Control+V copy and paste the script in
5. Press Control+S to save the script
6. Choose Run > sortSheets
7. Go back to the spreadsheet tab to view the new sorted tab order
--Copy everything below this line--
function sortSheets () {
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names
@marcorei
marcorei / clean-toc.gs
Created March 10, 2016 12:05
Google Apps Script which cleans the Table of Content from unwanted headings.
/**
* Creates a menu entry in the Google Docs UI when the document is opened.
*
* @param {object} e The event parameter for a simple onOpen trigger. To
* determine which authorization mode (ScriptApp.AuthMode) the trigger is
* running in, inspect e.authMode.
*/
function onOpen(e) {
DocumentApp.getUi().createAddonMenu()
.addItem('Clean Table of Contents', 'cleanToC')
@cwurld
cwurld / quickstart.py
Created January 11, 2016 14:50
Google Calendar Python API with Freebusy
"""
Mostly the Google quickstart.py code with the "freebusy" service running.
Also shows how to make datetimes using pytz.
Follow these instructions to get access credentials:
https://developers.google.com/google-apps/calendar/quickstart/python
"""
@aculich
aculich / aws_repoint_to_my_ip.sh
Last active October 26, 2015 21:36 — forked from hibernado/aws_repoint_to_my_ip.sh
Repoint AWS EC2 Security Group inbound access to my current IP address
#!/bin/bash
# Summary:
# Bash script repoints all inbound access for a given AWS EC2 security group
# to your current IP addr(v4) as provided by ifconfig.me/ip
# To use this script:
# Pass the name of a security group as a command line argument
# e.g. $ aws_repoint_to_my_ip.sh SECURITYGROUPNAME
@olalonde
olalonde / docker-machine-use-nfs.sh
Created August 13, 2015 14:48
Use NFS instead of vboxsf in Docker Machine
#!/bin/bash
#
# This script will mount /Users in the boot2docker VM using NFS (instead of the
# default vboxsf). It's probably not a good idea to run it while there are
# Docker containers running in boot2docker.
#
# Usage: sudo ./boot2docker-use-nfs.sh
#
@haggen
haggen / README.md
Last active September 11, 2018 03:19
boot2docker on nfs

Get boot2docker working with nfs instead of vboxsf.

Tested on:

- Boot2Docker-cli version: v1.6.0
  Git commit: 9894ae9
- Boot2Docker-cli version: v1.6.2
  Git commit: cb2c3bc
@noelwelsh
noelwelsh / Nullable.scala
Created April 17, 2015 10:38
Nullable types in Scala
object Nullable {
sealed trait NullableTag
type Nullable[A] = A with NullableTag
def nullAs[B]: Nullable[B] =
null.asInstanceOf[Nullable[B]]
implicit class ToNullable[A](val a: A) extends AnyVal {
def `?`: Nullable[A] = a.asInstanceOf[Nullable[A]]
}