Skip to content

Instantly share code, notes, and snippets.

/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@gabihodoroaga
gabihodoroaga / WriteFileWithName.java
Created April 26, 2023 12:41 — forked from ayush-poddar/WriteFileWithName.java
WordCount GCS with custom output file name
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.coders.StringUtf8Coder;
import org.apache.beam.sdk.io.FileIO;
import org.apache.beam.sdk.io.TextIO;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
import org.apache.beam.sdk.transforms.*;
import org.apache.beam.sdk.values.KV;
import org.apache.beam.sdk.values.TypeDescriptors;
@gabihodoroaga
gabihodoroaga / SplitTableRowsIntoPartitions.java
Created April 26, 2023 12:40 — forked from pbrumblay/SplitTableRowsIntoPartitions.java
Apache Beam writing TableRows by partition column using FileIO writeDynamic
package com.fearlesstg.dataflow.pipelines;
import java.util.*;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.google.api.services.bigquery.model.TableRow;
import org.apache.beam.sdk.coders.StringUtf8Coder;
import org.apache.beam.sdk.io.Compression;
import org.apache.beam.sdk.io.FileIO;

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: