Skip to content

Instantly share code, notes, and snippets.

@mattzab
mattzab / Google.Sheets.Record.Data.Code.gs
Created September 6, 2017 15:49
Record History in Google Sheets
function recordHistory() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("History");
var source = sheet.getRange("A2:U2");
var values = source.getValues();
// values[0][0] = new Date();
sheet.appendRow(values[0]);
};
@mattzab
mattzab / CD2ISO.sh
Created September 6, 2017 15:51
Copy CD to Desktop/CDROM.iso
#!/bin/bash
(pv -n /dev/cdrom | dd of="$HOME/Desktop/CDROM.iso" bs=128M conv=notrunc,noerror) 2>&1 | dialog --gauge "Running dd if=/dev/cdrom of=$HOME/Desktop/CDROM.iso, please wait..." 10 70 0
function emailSummary() {
var ss = SpreadsheetApp.getActiveSpreadsheet()
var sh = ss.getSheetByName("Sheet1")
var file = DriveApp.getFileById('SpreadsheetKey') //open to the sheet you want and copy the ID from the url and put it here
MailApp.sendEmail("email@gmail.com", "Subject", "Body", { //email address, subject, message
name: 'Filename', //file name
attachments: [file.getAs(MimeType.PDF)] //file to attach
});
#!/bin/bash
wget wordpress.org/latest.zip
unzip latest.zip
cd wordpress
mv * ..
cd ..
rmdir wordpress
rm latest.zip
#!/bin/bash
cd ~/Downloads
wget https://goo.gl/fd3zc && sh crouton -n cinnamon -r trusty -t xiwi,core,cli-extra,touch,keyboard,extension

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Keybase OpenPGP v2.0.76
Comment: https://keybase.io/crypto
xsFNBFp9E3oBEADHHM3d2cpVPfvsADFdZxKwtPz/k62lfbaEAPR7ItT01lTPw8pF
zzgVt/Ixl/wxlz5PXnjEuNYozummphDgxPoakNptQCDkAvQFnemQv5m6JFy6vtse
UQsIE3yCJ4u7uFJ28OoxNhMkdFxQ3a5zY1YP8C7h7z2hANtsQadCEZaSIsWfXrbD
6MuubNOqxsc6LvhZKsPOVsryhQBCF1Lln/DDGFsySyMh170rbE6wUlow7PaT3QP6
xdnLol3JuHv7S+ReFXGGSK0h2sd2FlydO4AJBYZVSzh5obxD1b92/lbCjPJv99Gq
whMVE8bbVkivOL6tKEUog9BAch5cMTvNcND+Vq6DDVl/wnjwVYlrAUcozgsmweBa

Keybase proof

I hereby claim:

  • I am mattzab on github.
  • I am mattzab (https://keybase.io/mattzab) on keybase.
  • I have a public key whose fingerprint is 7E52 CEA8 6553 CD42 A48D 2408 FD49 F43C FE79 0E3B

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am mattzab on github.
  • I am mattzab (https://keybase.io/mattzab) on keybase.
  • I have a public key whose fingerprint is 10F2 25D4 100F CCF2 716C 6CD4 B75D 015C 84EA 5344

To claim this, I am signing this object:

sudo sh ~/Downloads/crouton -t xiwi,gnome-desktop,touch,extension,cli-extra,gtk-extra,lxde,xfce,kde -n ubuntu