Take log message and parse as JSON (create new column jsonobj):
parse "*" as jsonobjTake new jsonobj column and create a new column for the specified key in the JSON:
json field=jsonobj "my-obj-key"Take log message and parse as JSON (create new column jsonobj):
parse "*" as jsonobjTake new jsonobj column and create a new column for the specified key in the JSON:
json field=jsonobj "my-obj-key"| /* | |
| This script, when used with Google Apps Scripts, will delete 400 emails and | |
| can be triggered to run every few minutes without user interaction enabling you | |
| to bulk delete email in Gmail without getting the #793 error from Gmail. | |
| Google returns a maximum of 500 email threads in a single API call. | |
| This script fetches 400 threads in case 500 threads is causing timeouts | |
| Configure the search query in the code below to match the type of emails | |
| you want to delete |
| #!/usr/bin/env ruby | |
| ### make sure you `brew install chromedriver` and `gem install selenium-webdriver` before running this! | |
| require 'rubygems' | |
| require 'selenium-webdriver' | |
| hangout_url = ENV['hangout_url'] | |
| hangout_email = ENV['hangout_email'] | |
| hangout_password = ENV['hangout_password'] |
| # Force the underlying store for a Set to be an OrderedHash. | |
| class OrderedSet < Set | |
| def initialize(enum = nil, &block) | |
| @hash ||= ActiveSupport::OrderedHash.new | |
| super | |
| end | |
| end |
| #!/usr/bin/env ruby | |
| # http://en.wikipedia.org/wiki/RADIX-50 | |
| class String | |
| R50_CHARS = " ABCDEFGHIJKLMNOPQRSTUVWXYZ$.%0123456789" | |
| R50_LOOKUP = {}.tap { |h| String::R50_CHARS.split(//).each_with_index { |c, i| h[c] = i } } | |
| R50_CLEAN = /[[:upper:]|[:digit:]| |.|$|%]/ | |
| def radix50 | |
| [].tap do |r| | |
| self.upcase.scan(R50_CLEAN).inject([]) do |m, c| | |
| m << R50_LOOKUP[c] |