函数式是一种编程范式,面向对象也是一种编程范式。
函数式分为两类,Lisp 和 Haskell,Lisp又有很多方言,Clojure、Scheme 都是其中一种。
JavaScript 这个语言是基于原型的,可以用构造函数的方法去写 OOP,也可以去写函数式。
<!-- Example #1 - no styling --> | |
Made with ❤ in Switzerland | |
Made with ♥ in Switzerland | |
Made with ♡ in Switzerland | |
Made with ❤️ in Switzerland | |
Made with ♥️ in Switzerland | |
<!-- Example #2 - inline-styled ❤ --> | |
Made with <span style="color: #e25555;">♥</span> in Switzerland | |
Made with <span style="color: #e25555;">♥</span> in Switzerland |
/** | |
* jQuery plugin template by https://github.com/publicJorn | |
* Features: | |
* - ES6 (So, it requires a build step to transpile to ES5 for most environments) | |
* - Dynamic plugin name (only supply once) so it's easy to change later | |
* - Plugin factory to make it work in the browser, or with AMD / COMMONJS modules | |
* - Plugin instance is saved on the selector element | |
* - Default options are saved to the instance in case you need to figure out a difference between passed options | |
*/ | |
(function(global, factory) { |
gem 'rails_12factor'
to your Gemfile. This will add error logging and the ability for your app to serve static assets.bundle
RAILS_ENV=production rake db:create db:migrate db:seed
rake secret
and copy the outputexport SECRET_KEY_BASE=output-of-rake-secret
rake assets:precompile
. This will create a folder public/assets
that contains all of your assets.RAILS_ENV=production rails s
and you should see your app.Remember to clobber your assets (rake assets:clobber
) and re-precompile (rake assets:precompile
) if you make changes.
var webpack = require('webpack'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var path = require('path'); | |
var folders = { | |
APP: path.resolve(__dirname, '../app'), | |
BUILD: path.resolve(__dirname, '../build'), | |
BOWER: path.resolve(__dirname, '../bower_components'), | |
NPM: path.resolve(__dirname, '../node_modules') | |
}; |
List some crypto libraries for JavaScript out there. Might be a bit out dated. Scroll to the bottom.
http://www.w3.org/TR/WebCryptoAPI/
This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.
// | |
// _oo0oo_ | |
// o8888888o | |
// 88" . "88 | |
// (| -_- |) | |
// 0\ = /0 | |
// ___/`---'\___ | |
// .' \\| |// '. | |
// / \\||| : |||// \ | |
// / _||||| -:- |||||- \ |