Skip to content

Instantly share code, notes, and snippets.

spikeekips /
Last active Aug 29, 2015
`gopkgcd logging` will change the directory to that source repository.


$ env | grep GOPATH

Installed pakcages

spikeekips /
Last active Jul 15, 2020
Import & Export Script For Google Apps Script

Export & Import Google Apps Script

How To Use

Get the OAuth token

  1. Open OAuth 2.0 Playground
  2. Set the valid scopes, select all the scopes in Drive API
  3. Follow the steps
  4. Get the Access Token
# -*- coding: utf-8 -*-
import csv
import pprint
import json
import sys
f = sys.argv[1]
spikeekips /
Created May 27, 2015
get or filter the scopes of google apis
import os
import requests
import json
import sys
verbose = False
arguments = list()
for i in sys.argv[1:]:
if i in ('-v'):
View json.lua
require "cjson"
local dt = require "date_time"
From trink in IRC - thanks!
Example use:
address = ""
spikeekips /
Created Aug 26, 2015
Generate SSH secret key without passphrase
$ openssl rsa -in private_key_with_pass_phrase -out private_key_without_pass_phrase
spikeekips / diskusage.lua
Created Oct 8, 2015 — forked from mattupstate/diskusage.lua
heka disk usage decoder and filter
View diskusage.lua
Graphs disk usage data containing fields entield `DiskSize`, `DiskUsed`,
`DiskAvailable`, and `DiskPercentUsed`
- sec_per_row (uint, optional, default 60)
Sets the size of each bucket (resolution in seconds) in the sliding window.
- rows (uint, optional, default 1440)
Sets the size of the sliding window i.e., 1440 rows representing 60 seconds
spikeekips / 0_reuse_code.js
Created Oct 25, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
spikeekips / gist:8dba651a1978cfd1f93b
Last active Nov 24, 2015
Recover after `git reset --hard`
View gist:8dba651a1978cfd1f93b

I accidentally ran git reset --hard on my repo today too while having uncommitted changes too today. To get it back, I ran git fsck --lost-found, which wrote all unreferenced blobs to <path to repo>/.git/lost-found/. Since the files were uncommitted, I found them in the other directory within the <path to repo>/.git/lost-found/. From there, I can see the uncommitted files, copy out the blobs, and rename them.

Note: This only works if you added the files you want to save to the index (using git add .). If the files weren't in the index, they are lost.