Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Monica Spisar msyvr

💭
I may be slow to respond.
Block or report user

Report or block msyvr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@msyvr
msyvr / arrayMerge.py
Created Aug 8, 2018
merge and sort arrays
View arrayMerge.py
arr = [[123, 4], [2,1,20,10,0], [3]]
sorted([i for x in arr for i in x]) # sorted requires an iterable collection and returns the sorted collection
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

View algComplexity_arrayMax.js
// simple Big O eval
var M = A[ 0 ];
for ( var i = 0; i < n; i++){
if ( A[i] > M ) {
M = A[i];
}
}
/*
View rails 5.1 asset pipeline mgmt: yarn, webpack for all assets - css, fonts, images, ...
This details how best to manage assets in the rails pipeline for deployment to heroku:
http://www.akitaonrails.com/2017/06/28/rails-5-1-heroku-deployment-checklist-for-heroku
"
Make sure you have 2 boot files, first the canonical Procfile to be used by Heroku in production:
1 web: bin/rails server -p $PORT -b 0.0.0.0
Second, a Procfile.dev to be used only in your development environment:
1 web: ./bin/rails server
@msyvr
msyvr / rails 5 asset pipeline management: fonts
Last active Nov 1, 2019
Getting custom fonts to work for Rails 5 app deployed to Heroku.
View rails 5 asset pipeline management: fonts
I deployed to Heroku and custom fonts didn't work. Details of my starting point below.
Fixed in 2 steps:
1. In application.rb file, in class Application < Rails::Application, added:
config.assets.paths << Rails.root.join("app","assets","fonts")
2. In application.scss file, in @font-face, changed src: url('...') to font-url('...'); e.g.:
src: font-url('Aileron/Aileron-Regular.otf') format('opentype');
Redeployed to Heroku and custom fonts worked.
---
Starting point details (this all worked for a local deploy, but not when deployed on Heroku):
You can’t perform that action at this time.