Skip to content

Instantly share code, notes, and snippets.

View 1Rhino's full-sized avatar

1rhino 1Rhino

View GitHub Profile
@1Rhino
1Rhino / cloudSettings
Created December 24, 2017 07:38
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-12-24T07:38:53.099Z","extensionVersion":"v2.8.7"}
@1Rhino
1Rhino / cloudSettings
Created March 21, 2018 16:41
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-03-21T16:41:04.629Z","extensionVersion":"v2.9.0"}
@1Rhino
1Rhino / cloudSettings
Last active June 12, 2018 10:12
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-06-12T10:12:01.675Z","extensionVersion":"v2.9.2"}
  1. UserApi.js
import axios from "axios"

export default {
  getAllExtraCompanies: function (cb, errorCB) {
    let url = '/api/backend/extra_companies'
    this._sendRequestToDelivery(url, {}, 'get', cb, errorCB)
  },
@1Rhino
1Rhino / web-fonts-asset-pipeline.md
Created May 25, 2018 07:53 — forked from anotheruiguy/web-fonts-asset-pipeline.md
Custom Web Fonts and the Rails Asset Pipeline

Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.

Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.

As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.

The recommended way

Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.