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 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 Feb 25, 2021
Helper for yarn linking PN node modules
View yarn-link-list.sh
View main.js
// This our standard require js bootstrap file. It assumes you are using the
// require-jquery.js file that require.js provides
// Set the require.js configuration for the application
require.config({
// Base path used to load scripts
baseUrl: 'js/',
// Prevent caching during dev
urlArgs: "bust=" + (new Date()).getTime(),
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;
View OpenUrl.h
/********* OpenUrl.h Cordova Plugin Header *******/
#import <Cordova/CDV.h>
@interface OpenUrl : CDVPlugin
- (void)openUrl:(CDVInvokedUrlCommand*)command;
@end
@typeoneerror
typeoneerror / Bash.sublime-build
Created Jan 11, 2012
Bash build system for running currently open script in Sublime Text 2
View Bash.sublime-build
{
"cmd" : ["$file"],
"selector" : "source.shell",
"shell" : "bash"
}
@typeoneerror
typeoneerror / notes.md
Last active Jul 18, 2018
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
View drip-es6.js
// @flow
/**
* {
* success: true,
* visitor_uuid: "f627ee608adb01315d1022000ab2058a",
* anonymous: false,
* email: "john@acme.com",
* custom_fields: { "name": "John" },
* tags: ["Customer"],