Skip to content

Instantly share code, notes, and snippets.

@techjanitor
techjanitor / gcs.go
Created May 9, 2015 04:08
Upload a file to Google Cloud Storage
package main
import (
"errors"
"fmt"
"golang.org/x/oauth2"
"golang.org/x/oauth2/jwt"
storage "google.golang.org/api/storage/v1"
"os"
)
@techjanitor
techjanitor / exec.go
Created June 11, 2015 18:16
concurrent exec: single producer, multiple consumer
package main
import (
"bufio"
"flag"
"fmt"
"io/ioutil"
"os"
"os/exec"
"strings"
@techjanitor
techjanitor / backup.sh
Last active February 3, 2016 04:59
mysql backup cron
#!/bin/bash
# creates a mysql backup
#
# CREATE USER 'backups'@'localhost' IDENTIFIED BY 'password';
# GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'backups'@'localhost';
# FLUSH PRIVILEGES;
#
# restore: innobackupex --copy-back /data/backups/whatever
# timestamp

Keybase proof

I hereby claim:

  • I am techjanitor on github.
  • I am oscillons (https://keybase.io/oscillons) on keybase.
  • I have a public key whose fingerprint is 38E0 8372 B3F6 6F58 40FA 6CD9 F1E5 E965 0091 5078

To claim this, I am signing this object: