This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WITH | |
| Instances AS( | |
| SELECT | |
| SPLIT(name, '/') as nameComponents, | |
| -- Extracting the creation timestamp | |
| resource.DATA.creationTimestamp as createTime, | |
| -- Extracting the current lifecycle status (RUNNING, TERMINATED, etc.) | |
| CAST(resource.DATA.status AS STRING) AS instanceStatus, | |
| -- Access the nested Secure Boot boolean | |
| CAST(resource.DATA.shieldedInstanceConfig.enableSecureBoot AS BOOL) AS secureBootEnabled, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bq show --schema --format=prettyjson project_id:dataset_id.table_view_id | pbcopy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'json' | |
| require 'time' | |
| abort "Usage: ./script import-file [export-file]" if ARGV.empty? | |
| input_file = ARGV.shift | |
| export_filename = ARGV.shift | |
| export_filename = 'exported_bookmarks.html' if export_filename.empty? || export_filename.nil? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function sortTableByColumn(col, table) { | |
| // Get all rows | |
| let rows = Array.from(table.rows); | |
| // Ignore the header row | |
| rows = rows.slice(1); | |
| // Sort the rows | |
| rows.sort((row1, row2) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Function to check if the MX records point to Google, Microsoft or somewhere else | |
| function checkMXRecords() { | |
| // Open your Google Spreadsheet | |
| var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
| // Show error if there's no Sheet linked to the script | |
| if (spreadsheet == null) { | |
| throw 'No active spreadsheet'; | |
| } |