Skip to content

Instantly share code, notes, and snippets.

View paina's full-sized avatar

T. "paina" SATO paina

View GitHub Profile
const EMAILS_ADD = ["john@example.com", "doe@example.co.jp"];
const EVENT_LIST_BEFORE_MONTH = 30;
const EVENT_LIST_AFTER_MONTH = 2;
const DRY_RUN = false;
function addAttendeeToAllEvents() {
const calendarId = 'primary';
let start = new Date();
let end = new Date();
start.setMonth(start.getMonth() - EVENT_LIST_BEFORE_MONTH);
@paina
paina / internetsim-vmware-hack.sh
Last active August 24, 2018 07:29
Fixes VITOCHA OVA Image to work with VMware Fusion
#!/bin/sh
ORIGINAL_OVA=${1:-./InternetSim.ova}
DESTDIR=${2:-.}
tar -C $DESTDIR -xvf $ORIGINAL_OVA
cp -ip $DESTDIR/InternetSim.ovf $DESTDIR/InternetSim.ovf_ORG
sed -i "" 's/ovf:capacity="19326328320"/ovf:capacity="18" ovf:capacityAllocationUnits="GigaBytes"/' $DESTDIR/InternetSim.ovf
sed -i "" 's/ovf:capacity="21474836480"/ovf:capacity="20" ovf:capacityAllocationUnits="GigaBytes"/' $DESTDIR/InternetSim.ovf