Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if [ -z "${PROJECT}" -o -z "${DATASET}" ]; then
echo "Please set \$PROJECT and \$DATASET."
exit 1
fi
IFS='' read -d '' Q <<EOF
#standardSQL
/*
#!/bin/bash
if [ -z "${PROJECT}" -o -z "${DATASET}" ]; then
echo "Please set \$PROJECT and \$DATASET."
exit 1
fi
IFS='' read -d '' Q <<EOF
#standardSQL
/*
@domgiles
domgiles / alertlogparser.py
Last active April 20, 2021 17:49
Simple parse for Oracle Alert Log Files
from __future__ import print_function
import argparse
import os
import time
import humanize
import psutil
from colorama import Fore, Back
from colorama import Style, init
@santisbon
santisbon / Search my gists.md
Last active July 18, 2024 08:43
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@DGrady
DGrady / oracle-query.org
Last active March 21, 2024 11:57
Example of querying an Oracle database using Python, SQLAlchemy, and Pandas

Query Oracle databases with Python and SQLAlchemy

N.B. SQLAlchemy now incorporates all of this information in its documentation; I’m leaving this post here, but recommend referring to SQLAlchemy instead of these instructions.

Install requirements

  1. We’ll assume you already have SQLAlchemy and Pandas installed; these are included by default in many Python distributions.
  2. Install the cx_Oracle package in your Python environment, using either pip or conda, for example:
@vicenteg
vicenteg / getBigQuerySchema.sh
Created August 22, 2017 13:04
Shell script to extract the schema from an existing BigQuery table and output the schema in a format suitable for use with `bq mk`.
#!/bin/bash
if [ -z $1 ]; then
echo "Provide a BQ table spec, ideally fully qualified."
exit 1
fi
if $(echo "" | jq .); then
bq --format json show $1 | jq -j '[.schema.fields[] | .name + ":" + .type] | join(",")'
@ueokande
ueokande / benchmark-commands.md
Last active January 22, 2024 12:38 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands

Benchmark commands

Producer

Setup

bin/kafka-topics.sh \
  --zookeeper zookeeper.example.com:2181 \
  --create \
@dantheman213
dantheman213 / export_db_structure.sh
Last active March 5, 2024 02:55
Batch backup and export your Postgres or PostgreSQL table schemas and stored functions or procedures into individual *.sql files --the easy way!
#!/bin/sh
# AUTHOR
# DANIEL E. GILLESPIE (2016)
# https://github.com/dantheman213
# DESCRIPTION
# Export your app's table schemas and stored functions from a PostgreSQL
# database into individual *.sql files for easy management and source control.
@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active June 26, 2024 15:54
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@jonschlinkert
jonschlinkert / markdown-toc_repeated-headings.md
Created December 15, 2015 19:42
Example table of contents generated by markdown-toc, correctly links repeated headings.