Skip to content

Instantly share code, notes, and snippets.

Avatar
🤠
iOS, Capacitor, Ember, Vue, Rails

Benjamin Borowski typeoneerror

🤠
iOS, Capacitor, Ember, Vue, Rails
View GitHub Profile
View notion-update-icons.js
const { notion, yargs } = require('../../shared');
const { fetchAllPages, performWithAll } = require('../../shared/fetch-pages');
const databaseId = 'e6a07b67d28a432fbd9029f18f3a27b8';
async function editPage(page) {
const params = {
page_id: page.id,
icon: {
type: 'emoji',
@typeoneerror
typeoneerror / essay-01.md
Last active July 26, 2021 15:15
#ship30for30 — @typeoneerror
View essay-01.md

(1) First Day on Duty

Today is for firsts

My first #ship30for30 essay. It's also my first day on "duty" as an alternate lieutenant at the Halfmoon Bay Volunteer Fire Department. I'll spend the week on-call 24/7—ready for response—emergency and non-emergency.

I started the morning helping EMS with a stage 4 cancer patient. Car 1 (my duty designation and truck) is parked in the driveway, prepared to respond when I receive a page.

And, to be perfectly honest, today I feel more prepared to lead an interior attack on a burning structure than to write a 250 word essay. But then, I didn't get to where I am as a volunteer firefighter by avoiding scary unknowns.

@typeoneerror
typeoneerror / yarn-link-list.sh
Last active February 25, 2021 18:48
Helper for yarn linking PN node modules
View yarn-link-list.sh
View workflow.yml
# This works for PUSH but not PULL_REQUEST
if: "!contains(github.event.head_commit.message, '[skipci]')"
# So down here in the STEP, grab the commit message via git log
# But now how do I EXIT the workflow??
- name: Skip if commit contains skipci
run: |
commitmsg=$(git log --format=%B -n 1 ${{ github.event.after }})
View orderable.rb
module Orderable
extend ActiveSupport::Concern
module ClassMethods
##
# Run a "single" query to update multiple records by a position field.
#
# The Array of passed in IDs are sorted in the order they are provided in the array.
View confirm-transition.js
// mixins/confirm-transition.js
import Ember from 'ember';
const {
isPresent,
Mixin,
RSVP
} = Ember;
@typeoneerror
typeoneerror / notes.md
Last active July 18, 2018 20:17
Key-Value CSS validation concept
View notes.md

Iheanyi,

I realize your app may not be ruby-based, but here's how I've worked with this dilemma in mind in our app. To start, yes, we don't necessarily support custom CSS, but I do have a database field I (as admin) can add custom CSS to a customer's account template (in the case they have "premium support" or something). Our publicly customizable style settings are key:value based and stored as a JSON object in psql as you suggested might be an option. Here's how I make it less unweildy:

Field in the database:

t.json :settings
@typeoneerror
typeoneerror / drip-es6.js
Last active February 23, 2018 21:59
drip-es6.js
View drip-es6.js
// @flow
/**
* {
* success: true,
* visitor_uuid: "f627ee608adb01315d1022000ab2058a",
* anonymous: false,
* email: "john@acme.com",
* custom_fields: { "name": "John" },
* tags: ["Customer"],
View repair_progress_spec.rb
unlock_tests = [
['ULLL', 'ULLL'], # first unlocked, do nothing
['LLLL', 'ULLL'], # first should be unlocked
['LULL', 'UULL'],
['LLUL', 'UUUL'],
['LLLU', 'UUUU'],
['UULL', 'UULL'],
View dictionary-observable.js
// mixins/dictionary-observable.js
import Ember from 'ember';
const {
Mixin,
on,
run
} = Ember;