Skip to content

Instantly share code, notes, and snippets.

View tkarpinski's full-sized avatar

Tod Karpinski tkarpinski

View GitHub Profile
GENERAL
-------
Use real tabs that equal 4 spaces.
Use typically trailing braces everywhere (if, else, functions, structures, typedefs, class definitions, etc.)
if ( x ) {
}
@tkarpinski
tkarpinski / bigdata-log-query.sql
Last active January 7, 2017 21:05
Migrate Nearline Storage to Coldline storage for Arq Backup on Google Cloud
SELECT
MIN(cast(time_micros as timestamp)) as mi,
MAX(cast(time_micros as timestamp)) as ma,
COUNT(*) as ct,
cs_bucket,
cs_user_agent
FROM [{PROJECTNAME}:storageanalysis.usage]
--WHERE cs_user_agent = 'GCS Lifecycle Management' -- if you only want Lifecycle events
GROUP BY cs_bucket,cs_user_agent
ORDER BY ma DESC

Keybase proof

I hereby claim:

  • I am tkarpinski on github.
  • I am todkarpinski (https://keybase.io/todkarpinski) on keybase.
  • I have a public key ASAUNOlmtJmzY3G0Qo5hpwbJoLXIzzBNMHxi1jjNQ-xt3go

To claim this, I am signing this object: