ElectronはNodeとほとんど差がないので、NPMで入れたパッケージも使える。 今回は簡単な画像編集ができるアプリを作ってみる。
npm init| = f.simple_fields_for :inputs do |input| | |
| = render 'input_fields', f: input | |
| .links | |
| = link_to_add_association f, :inputs, partial: 'input_fields', force_non_association_create: true do | |
| Add |
| unless Rails.env.production? | |
| connection = ActiveRecord::Base.connection | |
| connection.tables.each do |table| | |
| connection.execute("TRUNCATE #{table}") unless table == "schema_migrations" | |
| end | |
| sql = File.read('db/import.sql') | |
| statements = sql.split(/;$/) | |
| statements.pop |
| --- | |
| # file ruby.yml | |
| - hosts: all | |
| gather_facts: false | |
| sudo: true | |
| vars: | |
| # Where to install rbenv | |
| - rbenv_root: /usr/local/rbenv | |
| # The version of Ruby to install |
Install the following packages using pacman -S package-name:
| { | |
| /* | |
| * UI関係 | |
| */ | |
| // カラー&スキーマ | |
| "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", // カラー | |
| "theme": "Soda Dark.sublime-theme", // スキーマ | |
| // カーソルのスタイル ("smooth", "phase", "blink", "wide", "solid") | |
| "caret_style": "smooth", |
| body { | |
| font-family: Helvetica, arial, sans-serif; | |
| font-size: 14px; | |
| line-height: 1.6; | |
| padding-top: 10px; | |
| padding-bottom: 10px; | |
| background-color: white; | |
| padding: 30px; } | |
| body > *:first-child { |
| #!/bin/sh | |
| # | |
| # Create Google Chrome launcher (for Mac) | |
| # | |
| CHROME_APP="/Applications/Google Chrome.app" | |
| CHROME_PROFILE_DIR="$HOME/Library/Application Support/Google/Chrome" | |
| echo "Enter profile name: \c" |