Skip to content

Instantly share code, notes, and snippets.

View bhoggard's full-sized avatar

Barry Hoggard bhoggard

  • Tristan Media LLC
  • New York, NY
View GitHub Profile
@bhoggard
bhoggard / subscription_created.json
Created March 8, 2024 14:45
chargebee webhook events for subscriptions
{
"id": "ev_169vvoU3YUvqS75n",
"occurred_at": 1707265233,
"source": "admin_console",
"user": "admin@vvrkshop.art",
"object": "event",
"api_version": "v2",
"content": {
"subscription": {
"id": "169vvoU3YUvoI75i",
update auth.users set raw_user_meta_data=JSONB_BUILD_OBJECT('netvvrk_role', 'admin');
@bhoggard
bhoggard / page.sh
Last active September 4, 2023 23:51
Create Redwood.js app
➜ storytest git:(main) yarn rw g page home /
✔ Generating page files...
✔ Successfully wrote file `./web/src/pages/HomePage/HomePage.stories.jsx`
✔ Successfully wrote file `./web/src/pages/HomePage/HomePage.test.jsx`
✔ Successfully wrote file `./web/src/pages/HomePage/HomePage.jsx`
✔ Updating routes file...
✔ Generating types...
✔ One more thing...
Page created! A note about <MetaTags>:
At the top of your newly created page is a <MetaTags> component,
@bhoggard
bhoggard / learning.py
Last active March 16, 2023 20:27
Python notes
# reversing array/list
mylist[::-1]
# slices are up to, not including, 2nd number
list = [1,2,3,4,5]
list[1:3] # => [2, 3]
@bhoggard
bhoggard / Notes on Python for Data Analysis 3E.md
Last active October 11, 2022 23:41
Notes on Python for Data Analysis, 3E

Notes on Python for Data Analysis, 3E

The Python community has adopted a number of naming conventions for commonly used modules:

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import statsmodels as sm
{"version":1,"resource":"file:///Users/barry/code/artsy/gravity/app/models/domain/bidder_position.rb","entries":[{"id":"RkP9.rb","timestamp":1649465059871},{"id":"lVcX.rb","timestamp":1649465092131},{"id":"iMrC.rb","timestamp":1649728983935},{"id":"oWtw.rb","timestamp":1649782069309},{"id":"lKl5.rb","timestamp":1649782110751},{"id":"yGJ7.rb","timestamp":1649782424189},{"id":"auWR.rb","timestamp":1649782483883},{"id":"chQB.rb","timestamp":1649782524636},{"id":"py9D.rb","timestamp":1649782587850},{"id":"Eu8S.rb","timestamp":1649782966707},{"id":"PQmN.rb","timestamp":1649782990528},{"id":"K4Tw.rb","timestamp":1649783029700},{"id":"CqKy.rb","timestamp":1649783062856},{"id":"Ti6M.rb","timestamp":1649783205158},{"id":"sa3W.rb","timestamp":1649783250354},{"id":"TTVF.rb","timestamp":1649783279049},{"id":"dKNc.rb","timestamp":1649783307393},{"id":"y7nd.rb","timestamp":1649788114493}]}
@bhoggard
bhoggard / github-elixir-deploy.yml
Created June 27, 2021 16:20
GitHub actions to test an Elixir Phoenix application and deploy to Gigalixir
name: CI/CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
MIX_ENV: test
function sendEmail({email}: {email: string}): string {
return `Emailing ${email}`
}
@bhoggard
bhoggard / .rubocop.yml
Created September 6, 2020 19:40
My preferred rubocop configuration
require:
- rubocop-performance
- rubocop-rails
AllCops:
Exclude:
- bin/*
- db/schema.rb
- node_modules/**/*
- vendor/**/*
@bhoggard
bhoggard / berlin-recommendations-2019.md
Last active July 17, 2019 12:30
Berlin recommendations

Berlin Recommendations

Art

  • Try to get a ticket to tour the Boros collection in a former bunker
  • http://www.indexberlin.de/ for gallery listings
  • get a 3-day pass to see the Museum Island museums plus Hamburger Bahnhof for contemporary art. Definitely have lunch or at least coffee and cake at the Hamburger Bahnhof restaurant.
  • Nefertiti at the Neues Museum (Museum Island) is not hype - it's worth a visit

Food/Drink