Add subl command to command line
> ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
Install
- Sidebar Enhancements
- Soda Theme Dark
- Sass/Scss Syntax
- Babel Syntax
- Emmet
| // monokai | |
| $pink: #ff6188; | |
| $red: $pink; | |
| $green: #a9dc76; | |
| $yellow: #ffd866; | |
| $orange: #fc9867; | |
| $purple: #ab9df2; | |
| $blue: #78dce8; | |
| $black: #2c292d; | |
| $white: #fdf9f3; |
Add subl command to command line
> ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
Install
| // dependencies | |
| // > yarn add csvtojson | |
| // Usage: | |
| // > node csv-to-json.js input.csv output.json | |
| const fs = require('fs') | |
| const path = require('path') | |
| const csv = require('csvtojson') |
| // .babelrc | |
| { | |
| "presets": ["es2015"] | |
| } |
| /* | |
| { | |
| "name": "language", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "", |
| from modelcluster.fields import ParentalKey | |
| from wagtail.wagtailcore.models import Page, Orderable | |
| # The Parent/Consuming page | |
| class ExamplePage(Page): | |
| content_panels = Page.content_panels + [ | |
| InlinePanel('related_sub_model_label', label="Ui Heading for inline model"), | |
| ] | |
| # The abstract class defining the fields. Can be named whatever. |
http://guides.rubyonrails.org/migrations.html
| ActiveRecord cheat sheet / EXAMPLES | |
| INSTALL | |
| ======= | |
| $ gem install activerecord | |
| in GEMFILE: gem ‘activerecord’ | |
| REQUIRE | |
| ======= | |
| require ‘active_record’ |
| # Source: http://snipplr.com/view/73984/human-readable-time-from-seconds-helper/ | |
| def time_spent_in_words seconds, params={} | |
| time_periods_shown = params[:time_periods_shown] || 3 | |
| use_short_names = params[:use_short_names] || false | |
| return "0 seconds" if seconds < 1 | |
| short_name = {:second => :sec, :minute => :min, :hour => :hr, :day => :day, :week => :wk, :year => :yr} | |
| [[60, :second], [60, :minute], [24, :hour], [7, :day], [52, :week], [1000, :year]].map{ |count, name| | |
| if seconds > 0 |