Skip to content

Instantly share code, notes, and snippets.

@gvarela
gvarela / LGPrimingPrompt.txt
Created March 8, 2023 22:58 — forked from leegonzales/LGPrimingPrompt.txt
ChatCHPT priming prompt for writing style, general commands, and multistep macros.
This is your Corpus, these are your instructions, follow them to the best of your ability. After you read and digest the following do not say anything other than ".." to indicate you are finished.
Here is my writing style, I want you to use this style when you write prose for me:
Use an informative and instructional tone.
Adopt an academic style, drawing upon extensive study and experience.
Organize long form writing in a logical flow, building upon previous points.
Demonstrate a high level of depth of knowledge.
Use examples to illustrate points and make them more relatable.
Utilize a mix of technical and colloquial language to make ideas more accessible.
Provide detailed definitions and descriptions of key concepts.
@gvarela
gvarela / date_dimension.sql
Created January 1, 2020 22:56
date dimension table in postgres
DROP TABLE if exists d_date;
CREATE TABLE d_date
(
date_dim_id INT NOT NULL,
date_actual DATE NOT NULL,
epoch BIGINT NOT NULL,
day_suffix VARCHAR(4) NOT NULL,
day_name VARCHAR(9) NOT NULL,
day_of_week INT NOT NULL,
export WEBROOT_KEY='SA6C-ENTP-BC82-CED5-D3CD' && \
export JUMPCLOUD_KEY='3a0a30efee4576150ad8dbf619d9c7b2f162737a' && \
bash < <(curl -L https://cirrusmd.box.com/shared/static/7yox0c8ao2skrtx3al0pa50d4uh5s884.sh)
@gvarela
gvarela / dns_map.sh
Last active September 26, 2017 21:07
.dev with nginx and dnsmasq
#!/bin/bash
rm .nginx.conf
while [[ $# > 1 ]]
do
key="$1"
case $key in
-p|--port)
PORT="$2"

INCIDENT DATE - INCIDENT TYPE

Meeting

Waiving meetings

In some cases the IC might determine that a PM meeting for the incident isn't needed. If the IC decides to waive the meeting please replace the Meeting section with a note indicating the meeting has been waived (example: Meeting waived: Paul Mooring)

@gvarela
gvarela / nginx.conf
Created September 21, 2016 03:09
nginx with websockets for a local phoenix server
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream useful-api {
server 127.0.0.1:4000;
}
server {
@gvarela
gvarela / Dockfile
Created May 24, 2016 17:50
Phoenix / Elixir Docerfile
FROM quay.io/aptible/alpine
############################################################################
######################## Erlang setup ######################################
############################################################################
# Important! Update this no-op ENV variable when this Dockerfile
# is updated with the current date. It will force refresh of all
# of the base images and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built.
@gvarela
gvarela / dev-dns
Created April 28, 2015 16:34
Mimic pow and powder by generating a local nginx conf file that is symlinked to the homebrew nginx configuration. requires dnsmasq and nginx to be installed.
#!/bin/bash
rm .nginx.conf
while [[ $# > 1 ]]
do
key="$1"
case $key in
-p|--port)
PORT="$2"
### Keybase proof
I hereby claim:
* I am gvarela on github.
* I am gvarela (https://keybase.io/gvarela) on keybase.
* I have a public key whose fingerprint is 8FF2 8DDF 3216 467C 9AAD D96C 491A 5FE0 05DA 02F9
To claim this, I am signing this object:
@gvarela
gvarela / setup
Last active May 17, 2023 15:19
A bash rails setup script to help someone get started on a rails project.
#!/usr/bin/env bash
{
RUBY_VERSION=$(cat .ruby-version)
RUBY_VERSION=${RUBY_VERSION:=2.1.0}
PROJECT_NAME=__PROJECT_NAME__
} >/dev/null 2>&1
## bootstrap function called at bottom of file comment out verification steps you don't need
init (){
verify_ruby_version &&