Skip to content

Instantly share code, notes, and snippets.

View scotchneat's full-sized avatar

Cesar Garza scotchneat

View GitHub Profile
@scotchneat
scotchneat / gh-release-notes.sh
Last active November 1, 2023 16:24
GitHub [gh] list all merged PRs since last commit to master
set -e
repo=coreweave/cloud-app
git checkout develop
# Get Current commit
latest_sha=$(git rev-parse --short master)
# Get date for current commit
latest_sha_date=$(gh pr list -s merged --json number,title,mergedAt,labels,mergeCommit,baseRefName,headRefName --repo $repo | jq -r --arg sha "$latest_sha" '.[] | select(.mergeCommit.oid | startswith($sha)) | .mergedAt')
@scotchneat
scotchneat / yt_transcript_search.py
Last active October 5, 2020 21:06
YouTube Transcript Search
# yt-transcript.py <video_id>
from youtube_transcript_api import YouTubeTranscriptApi
def search(transcript):
search_text = input("What do you want to find?: ")
if not search_text:
exit()
context_lines = int(input("How many context lines (before and after) do you want to show?: "))
@scotchneat
scotchneat / deals
Last active August 9, 2019 20:13
register-data
[
{"code":"BOGO","buyProduct":"CF1","getProduct":"CF1","buyQuantity":1,"getQuantity":1,"discountType":1,"value":100,"max":-1},
{"code":"APPL","buyProduct":"AP1","getProduct":"AP1","buyQuantity":3,"getQuantity":-1,"discountType":2,"value":150,"max":-1},
{"code":"CHMK","buyProduct":"CH1","getProduct":"MK1","buyQuantity":1,"getQuantity":1,"discountType":1,"value":100,"max":1},
{"code":"APOM","buyProduct":"OM1","getProduct":"AP1","buyQuantity":1,"getQuantity":1,"discountType":1,"value":50,"max":-1}
]
@scotchneat
scotchneat / keybase.md
Created April 17, 2019 19:44
keybase.md

Keybase proof

I hereby claim:

  • I am scotchneat on github.
  • I am scotchneat (https://keybase.io/scotchneat) on keybase.
  • I have a public key ASAFxTOR87kbAYpg8jAnbdGS6UdL7xIrA955kEGY8RCSMgo

To claim this, I am signing this object:

Useful Makefile targets

Help

This target assumes all targets have comments describing its purpose. It greps the file for comments that start with ## and prints the command with its respective description (comment).

.PHONY: help
@scotchneat
scotchneat / Makefile
Created April 11, 2019 21:33
Makefile
help: ## Prints this help message.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@scotchneat
scotchneat / Makefile
Created April 11, 2019 21:33
Makefile
help: ## Prints this help message.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@scotchneat
scotchneat / Makefile
Created October 26, 2018 02:18
Sample Makefile for a Python application
PACKAGE_NAME = package-name
VIRTUALENV = virtualenv --python=python3.7
VENV = .venv
VENV_ACTIVATE = . $(VENV)/bin/activate
help: ## Prints this help message.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
$(VENV):
$(VIRTUALENV) $(VENV)
@scotchneat
scotchneat / oracle_1Z0-061_notes.md
Created January 30, 2018 04:30 — forked from switchtrue/oracle_1Z0-061_notes.md
Notes for taking the 1Z0-061 Oracle Exam - Oracle Database 12c: SQL Fundamentals

Introduction

I have compiled these notes whilst revising for the Oracle 1Z0-061 Exam - Oracle Database 12c: SQL Fundamentals. They should also be relevant to the 1Z0-051 - Oracle Database 11g: SQL Fundamentals exam. Revision was most conducted using the excellent and highly recommended "OCA Oracle Database 12c SQL Fundamentals I Exam Guide" by Roopesh Ramklass.

I have aimed to include include in these notes common "gotchas" and easy to forget functionality rather than documenting everything required for the exam. This can then be used as a quick refresher before walking into the exam.

The content is broken up into sections with each heading mapping to the relevant [Oracle 1Z0-061 exam topics](https://edu