Skip to content

Instantly share code, notes, and snippets.

View EverettBerry's full-sized avatar
☁️
Cloud Costs

retttx EverettBerry

☁️
Cloud Costs
View GitHub Profile
@EverettBerry
EverettBerry / local-ruby.markdown
Created April 23, 2023 18:39
Local Ruby and Jekyll install on Ubuntu 22.04
  sudo apt install ruby ruby-dev
  gem install --user-install bundler
  bundle config set --local path 'vendor/bundle'
  bundle install
Dimension Price
Compute-hours $1.50 per hour
Partition-hours $0.0015 per hour
Storage $0.10 per GiB-month
Data In $0.13 per GiB
Data Out $0.06 per GiB
Connectors $0.03 - $0.30 per hour
Schema Registry $0.002 per schema per hour
Dimension Price
Compute-hours $0.75 per hour
Partition-hours $0.0015 per partition per hour
Storage $0.10 per GiB-month
Data In $0.10 per GiB
Data Out $0.05 per GiB
Connectors $0.11 per hour
Schema Registry Free via AWS Glue
@EverettBerry
EverettBerry / pickle.py
Last active September 23, 2022 01:09
Debug large python dict
import pickle
with open('www/instances', 'wb') as f:
pickle.dump(all_instances, f)
with open('www/instances', 'rb') as f:
all_instances = pickle.load(f)
@EverettBerry
EverettBerry / configure_ruby.md
Last active August 27, 2022 17:39
Install Ruby and RVM on Ubuntu
sudo su
apt-add-repository -y ppa:rael-gc/rvm
apt-get update
apt install ruby ruby-dev rvm
usermod -a -G rvm $USER
reboot
const { TrackClient, RegionUS, SendEmailRequest, APIClient } = require('customerio-node')
const customerioSiteId = process.env.CUSTOMER_IO_SITE_ID
const customerioApiKey = process.env.CUSTOMER_IO_API_KEY
const api = new APIClient(process.env.CUSTOMER_IO_APP_KEY, { region: RegionUS })
const customerio = new TrackClient(customerioSiteId, customerioApiKey, {
region: RegionUS
})
if (eventType === 'createAccount') {
customerio.identify(user.id, {
email: user.email,
created_at: moment().unix(),
event: 'createAccount'
})
} else if (!customerioBlacklist.includes(eventType)) {
customerio.track(user.id, {
name: eventType,
data: {
<script type="text/javascript">
function Subscribe(){
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
var email = document.getElementById("mce-EMAIL-2");
let ms = Date.now()/1000;
message_pop = document.getElementById("messagepop");
if (email.value.match(validRegex)) {
_cio.identify({
id:ms*1000,
<button
css={buttonStyle(downloading, true)}
disabled={downloading}
onClick={async () => {
trackDownloadAppClick('mobile')
setDownloading(true)
setMessage('')
const response = await fetch(`${url}/api/download/mobile?email=${emailValue}`)
if (!response.ok) {
const body = await response.json()
wait customerioMail.sendMailFromObject({
to: email.trim(),
transactional_message_id: user ? '11' : '12',
identifiers: {
email: email.trim()
},
message_data: {
email: email.trim(),
queryId: queryId,
workspaceId: query.projectId,