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
@typeoneerror
typeoneerror / yarn-link-list.sh
Last active Feb 25, 2021
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 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"],
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;
View sidekiq.rb
require 'sidekiq/web'
redis_options = { url: ENV['REDIS_URL'] }
Sidekiq.configure_server do |config|
config.redis = redis_options
end
Sidekiq.configure_client do |config|
config.redis = redis_options
View keybase.md

Keybase proof

I hereby claim:

  • I am typeoneerror on github.
  • I am typeoneerror (https://keybase.io/typeoneerror) on keybase.
  • I have a public key ASBbvRF_CKJ6codLAUG9CBd1iXyXTRVMgvsGu0NzFaACugo

To claim this, I am signing this object: