In this guide we will cover two main cases:
- Ember specific library
- vendor library
The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.
| import parseFunction from 'parse-function' | |
| const app = parseFunction({ | |
| ecmaVersion: 2017, | |
| }) | |
| class DIC { | |
| constructor() { | |
| this.dependencies = {} | |
| this.factories = {} |
| <?php | |
| //namespace shgysk8zer0\PHPCrypt; | |
| const PUBLIC_KEY = './pub.pem'; | |
| const PRIVATE_KEY = './priv.pem'; | |
| const PUB2 = './pub2.pem'; | |
| const PRIV2 = './priv2.pem'; | |
| const PASSWORD = 'dgbdkfjg'; | |
| const PASSWORD2 = 'dfgnduyho'; |
| "use strict"; | |
| /** | |
| * Rupture.js | |
| * | |
| * ------------------------------------------------------------ | |
| * | |
| * Available methods: | |
| * | |
| * Rupture.activate() |
| <?php | |
| function sigmoid($t){ | |
| return 1 / (1 + pow(M_EULER, -$t)); | |
| } | |
| ?> |
| license: gpl-3.0 |
Set variables in a page (page.html.haml) at the very biginning of the file:
---
variable: value
variable2: value 2
---I have a project where I need translated content. Therefore I use globalize3, wich stores its translated attributes in a seperate table that belongs to the original model. And I use RailsAdmin for painless record management.
It took me some time to figure out how to get those working together, but eventually I found a solution that is non invasive and still ok to work with.
In my case there is a Snippet class. It holds content for static pages or text passages on the website. There is a good README for globalize3 for installation instructions and documentation.
| // Ported from Stefan Gustavson's java implementation | |
| // http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf | |
| // Read Stefan's excellent paper for details on how this code works. | |
| // | |
| // Sean McCullough banksean@gmail.com | |
| /** | |
| * You can pass in a random number generator object if you like. | |
| * It is assumed to have a random() method. | |
| */ |