Skip to content

Instantly share code, notes, and snippets.

View codyaverett's full-sized avatar
🎯
Focusing

Cody Averett codyaverett

🎯
Focusing
View GitHub Profile

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

@codyaverett
codyaverett / timescale--db--backend--base.py
Created October 22, 2022 09:27 — forked from dedsm/timescale--db--backend--base.py
WeRiot Django Timescale integration
import logging
from django.contrib.gis.db.backends.postgis.base import \
DatabaseWrapper as PostgisDBWrapper
from django.db import ProgrammingError
from .schema import TimescaleSchemaEditor
logger = logging.getLogger(__name__)
@codyaverett
codyaverett / bigquery_to_cloudsql_pg_schema.py
Created October 21, 2022 07:42 — forked from myselfhimself/bigquery_to_cloudsql_pg_schema.py
Convert an online BigQuery dataset's table schema into a PostgreSQL (eg. on CloudSQL) CREATE TABLE command
from google.cloud import bigquery
"""
Use this to convert an online BigQuery dataset's table schema into a PostgreSQL (eg. on CloudSQL) CREATE TABLE command.
"""
def get_table_schema(project_name, dataset_name, table_name):
"""Return 'project_name.dataset_name.table_name''s BigQuery table schema object."""
bq_client = bigquery.Client(project=project_name)
@codyaverett
codyaverett / index.html
Created October 8, 2022 19:49 — forked from gaearon/index.html
Multiple React components on a single HTML page
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@codyaverett
codyaverett / metadata.json
Created December 28, 2021 10:48
Marlowe-Contract-for-differences-JS
{"valueParameterInfo":[["Amount paid by party",{"valueParameterFormat":{"contents":[6,"₳"],"tag":"DecimalFormat"},"valueParameterDescription":"Amount that the _**party**_ will deposit at the beginning of the contract."}],["Amount paid by counterparty",{"valueParameterFormat":{"contents":[6,"₳"],"tag":"DecimalFormat"},"valueParameterDescription":"Amount that the _**counterparty**_ will deposit at the beginning of the contract."}]],"slotParameterDescriptions":[["Party deposit deadline","The _amount paid by party_ must be deposited by this deadline, otherwise the contract is cancelled."],["Counterparty deposit deadline","The _amount paid by counterparty_ must be deposited by this deadline, otherwise the contract is cancelled and money is refunded."],["First window beginning","The first _**oracle**_ reading must be taken after this."],["First window deadline","The first _**oracle**_ reading must be taken before this, otherwise the contract is cancelled and money is refunded."],["Second window beginning","The seco
@codyaverett
codyaverett / metadata.json
Created December 28, 2021 10:34
Marlowe-Escrow-Mediation-JS
{"valueParameterInfo":[["Price",{"valueParameterFormat":{"contents":[6,"₳"],"tag":"DecimalFormat"},"valueParameterDescription":"The price of the item."}]],"slotParameterDescriptions":[["Payment deadline","The _**buyer**_ must pay the _price_ of the item by this time, otherwise the contract is cancelled."],["Complaint deadline","The _**buyer**_ can only complain until this deadline, otherwise the contract will assume the transaction went smoothly and pay the _**seller**_."],["Complaint response deadline","If the _**buyer**_ complained, the _**seller**_ must respond before this deadline, otherwise the contract will assume there was a problem with the transaction and refund the _**buyer**_."],["Mediation deadline","If the _**buyer**_ and the _**seller**_ disagree, the _**mediator**_ must weigh in before this deadline, otherwise the contract will assume there was a problem with the transaction and refund the _**buyer**_."]],"roleDescriptions":[["Buyer","The buyer of the item."],["Mediator","The mediator decides w
@codyaverett
codyaverett / scrumPoker.md
Created April 27, 2020 18:30
InsightFul conversation about storypoints and scrum poker

D

Could someone direct me to or quickly explain to me the "reference" for what a point means in our new estimation scheming?

P 3 hours ago

Isn't it the level of effort for the task? We're only using Fibonacci numbers, Like 1 = super easy, 3=normal level of effort, and 8 = extremely difficult. @c0d00q7 said we shouldn't go above an 8. If we need to then it may need to be broken up into smaller tasks.

D 3 hours ago

Riiiight, but in true agile planning the point needs to "mean" something. There should be a reference point, like a 1 is "the level of effort involved in making a peanut butter sandwich".

P 3 hours ago

cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %1"
@codyaverett
codyaverett / draggable-example.js
Created April 21, 2020 03:31 — forked from remarkablemark/draggable-example.js
Basic draggable example using vanilla JavaScript.
'use strict';
/**
* Makes an element draggable.
*
* @param {HTMLElement} element - The element.
*/
function draggable(element) {
var isMouseDown = false;