Update app/vendor packages
This commit is contained in:
commit
8af730ebb3
|
@ -0,0 +1 @@
|
|||
node_modules
|
|
@ -2,3 +2,4 @@ _output
|
|||
_site
|
||||
.jekyll-metadata
|
||||
/node_modules
|
||||
/vendor
|
||||
|
|
|
@ -2,41 +2,38 @@
|
|||
|
||||
## Starting a local instance
|
||||
|
||||
This starts Jekyll and Webpack.
|
||||
This starts Jekyll and Webpack. This requires recent versions of [Node.js], [Yarn], [Ruby] and [Bundler] installed.
|
||||
|
||||
```
|
||||
```bash
|
||||
yarn install
|
||||
bundle install
|
||||
env PORT=4001 yarn run dev
|
||||
```
|
||||
|
||||
### Windows
|
||||
[node.js]: https://nodejs.org/en/download/package-manager/
|
||||
[ruby]: https://www.ruby-lang.org/en/documentation/installation/
|
||||
[yarn]: https://yarnpkg.com/en/docs/install
|
||||
[bundler]: https://bundler.io/
|
||||
|
||||
### Docker
|
||||
|
||||
You can also run a local instance using Docker. This is the preferred method, especially for Windows.
|
||||
You only need to install Docker ([macOS](https://docs.docker.com/docker-for-mac/install/), [Windows](https://docs.docker.com/docker-for-windows/install/), [Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/), [Arch Linux](https://www.archlinux.org/packages/community/x86_64/docker/), [other](https://www.docker.com/community-edition#download)).
|
||||
|
||||
First time setup:
|
||||
|
||||
1. Install **Ruby**: https://rubyinstaller.org/
|
||||
* After the installation check the box and type `3` to select the 3rd option
|
||||
* Add `C:\msys64\usr\bin` to PATH env variable
|
||||
* Add `C:\Ruby24-x64\bin` to PATH env variable
|
||||
2. Install **yarn**: https://yarnpkg.com/en/docs/install#windows
|
||||
3. Install **jekyll** via command prompt: `gem install jekyll bundler`
|
||||
4. Install **nodejs && npm**: https://nodejs.org/en/download/
|
||||
4. Install **webpack** via command prompt: `npm install -g webpack`
|
||||
5. If you have any issues after installing ruby, like `HOMEPATH` is not defined, then execute the below commands:
|
||||
```bash
|
||||
SETX HOMEDRIVE %SYSTEMDRIVE% -m
|
||||
SETX HOMEPATH \Users\%username% -m
|
||||
SET HOME=%SYSTEMDRIVE%\Users\%USERNAME%
|
||||
SETX HOME "%HOME%"
|
||||
# Build images (takes ~12mins)
|
||||
docker-compose build
|
||||
|
||||
# First-time setup
|
||||
docker-compose run --rm web bundle install
|
||||
```
|
||||
|
||||
#### Start Jekyll and Webpack
|
||||
|
||||
Go wherever the project's files are located and open a new command prompt, execute the below commands:
|
||||
Starting the server:
|
||||
|
||||
```bash
|
||||
yarn install
|
||||
bundle install
|
||||
SET PORT=4001
|
||||
yarn run dev
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
## CSS classes
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
FROM ruby:2.5.1-alpine3.7
|
||||
RUN apk update && apk add --no-cache nodejs build-base
|
||||
RUN apk add yarn --no-cache --repository http://dl-3.alpinelinux.org/alpine/v3.8/community/ --allow-untrusted
|
||||
RUN mkdir -p /app
|
||||
WORKDIR /app
|
||||
# COPY Gemfile Gemfile.lock ./
|
||||
# RUN bundle install -j 4
|
||||
# COPY package.json yarn.lock ./
|
||||
# RUN yarn
|
5
Makefile
5
Makefile
|
@ -1,5 +1,6 @@
|
|||
npmbin := ./node_modules/.bin
|
||||
PORT ?= 3000
|
||||
HOST ?= 127.0.0.1
|
||||
|
||||
# Builds intermediate files. Needs a _site built first though
|
||||
update: _site critical
|
||||
|
@ -23,9 +24,9 @@ dev-webpack:
|
|||
|
||||
dev-jekyll:
|
||||
if [ -f _site ]; then \
|
||||
bundle exec jekyll serve --safe --trace --drafts --watch --incremental --port $(PORT); \
|
||||
bundle exec jekyll serve --safe --trace --drafts --watch --incremental --host $(HOST) --port $(PORT); \
|
||||
else \
|
||||
bundle exec jekyll serve --safe --trace --drafts --watch --port $(PORT); \
|
||||
bundle exec jekyll serve --safe --trace --drafts --watch --host $(HOST) --port $(PORT); \
|
||||
fi
|
||||
|
||||
test: _site
|
||||
|
|
|
@ -22,6 +22,8 @@ exclude:
|
|||
- package-lock.json
|
||||
- webpack.config.js
|
||||
- node_modules
|
||||
- Dockerfile
|
||||
- docker_compose.yml
|
||||
|
||||
# Markdown
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
atom.md
2
atom.md
|
@ -62,7 +62,7 @@ See: [Symbols view](https://atom.io/packages/symbols-view)
|
|||
|
||||
### Editing
|
||||
|
||||
| Shortcut | Decription
|
||||
| Shortcut | Description
|
||||
| --- | ---
|
||||
| `⌘d` | Select word
|
||||
| `⌘l` | Select line
|
||||
|
|
2
bulma.md
2
bulma.md
|
@ -76,7 +76,7 @@ The following classes modify the **font-size**
|
|||
| `.is-size-6` | 1rem |
|
||||
| `.is-size-7` | 0.75rem |
|
||||
|
||||
The following classes **allign** the text
|
||||
The following classes **align** the text
|
||||
|
||||
| Class | Alignment |
|
||||
| --- | --- |
|
||||
|
|
1
chai.md
1
chai.md
|
@ -115,6 +115,7 @@ expect(object)
|
|||
.to.have.members([2, 3, 4])
|
||||
.to.have.keys(['foo'])
|
||||
.to.have.key('foo')
|
||||
.to.have.lengthOf(3)
|
||||
```
|
||||
|
||||
```js
|
||||
|
|
2
cron.md
2
cron.md
|
@ -37,7 +37,7 @@ Min Hour Day Mon Weekday
|
|||
| `0 * * * *` | every hour |
|
||||
| `*/15 * * * *` | every 15 mins |
|
||||
| `0 */2 * * *` | every 2 hours |
|
||||
| `0 0 0 * 0` | every Sunday midnight |
|
||||
| `0 0 * * 0` | every Sunday midnight |
|
||||
| --- | --- |
|
||||
| `@reboot` | every reboot |
|
||||
|
||||
|
|
2
curl.md
2
curl.md
|
@ -55,7 +55,7 @@ updated: 2017-09-20
|
|||
```
|
||||
|
||||
```bash
|
||||
-E, --ecrt <cert> # --ecrt: Client cert file
|
||||
-E, --cert <cert> # --cert: Client cert file
|
||||
--cert-type # der/pem/eng
|
||||
-k, --insecure # for self-signed certs
|
||||
```
|
||||
|
|
|
@ -94,7 +94,7 @@ divshot env:remove <env> KEY
|
|||
divshot env:pull <env>
|
||||
```
|
||||
|
||||
### App manangement
|
||||
### App management
|
||||
|
||||
```
|
||||
divshot create <appname>
|
||||
|
|
|
@ -4,7 +4,7 @@ category: Devops
|
|||
layout: 2017/sheet
|
||||
prism_languages: [yaml]
|
||||
weight: -1
|
||||
updated: 2018-03-17
|
||||
updated: 2018-06-26
|
||||
---
|
||||
|
||||
### Basic example
|
||||
|
@ -46,60 +46,101 @@ docker-compose down
|
|||
```
|
||||
|
||||
## Reference
|
||||
{: .-one-column}
|
||||
{: .-three-column}
|
||||
|
||||
### Building
|
||||
|
||||
```yaml
|
||||
web:
|
||||
# build from Dockerfile
|
||||
build: .
|
||||
```
|
||||
|
||||
```yaml
|
||||
# build from custom Dockerfile
|
||||
build:
|
||||
context: ./dir
|
||||
dockerfile: Dockerfile.dev
|
||||
```
|
||||
|
||||
```yaml
|
||||
# build from image
|
||||
image: ubuntu
|
||||
image: ubuntu:14.04
|
||||
image: tutum/influxdb
|
||||
image: example-registry:4000/postgresql
|
||||
image: a4bc65fd
|
||||
```
|
||||
|
||||
### Ports
|
||||
|
||||
```yaml
|
||||
ports:
|
||||
- "3000"
|
||||
- "8000:80" # guest:host
|
||||
```
|
||||
|
||||
```yaml
|
||||
# expose ports to linked services (not to host)
|
||||
expose: ["3000"]
|
||||
```
|
||||
|
||||
### Commands
|
||||
|
||||
```yaml
|
||||
# command to execute
|
||||
command: bundle exec thin -p 3000
|
||||
command: [bundle, exec, thin, -p, 3000]
|
||||
```
|
||||
|
||||
```yaml
|
||||
# override the entrypoint
|
||||
entrypoint: /app/start.sh
|
||||
entrypoint: [php, -d, vendor/bin/phpunit]
|
||||
```
|
||||
|
||||
### Environment variables
|
||||
|
||||
```yaml
|
||||
# environment vars
|
||||
environment:
|
||||
RACK_ENV: development
|
||||
environment:
|
||||
- RACK_ENV=development
|
||||
```
|
||||
|
||||
```yaml
|
||||
# environment vars from file
|
||||
env_file: .env
|
||||
env_file: [.env, .development.env]
|
||||
```
|
||||
|
||||
# expose ports to linked services (not to host)
|
||||
expose: ["3000"]
|
||||
|
||||
# make this service extend another
|
||||
extends:
|
||||
file: common.yml # optional
|
||||
service: webapp
|
||||
### Dependencies
|
||||
|
||||
```yaml
|
||||
# makes the `db` service available as the hostname `database`
|
||||
# (implies depends_on)
|
||||
links:
|
||||
- db:database
|
||||
- redis
|
||||
```
|
||||
|
||||
```yaml
|
||||
# make sure `db` is alive before starting
|
||||
depends_on:
|
||||
- db
|
||||
```
|
||||
|
||||
### Other options
|
||||
|
||||
```yaml
|
||||
# make this service extend another
|
||||
extends:
|
||||
file: common.yml # optional
|
||||
service: webapp
|
||||
```
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- /var/lib/mysql
|
||||
- ./_data:/var/lib/mysql
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
version: '3'
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
volumes:
|
||||
- .:/app
|
||||
- rubygems:/usr/local/bundle
|
||||
ports:
|
||||
- '4001:4001'
|
||||
- '35729:35729'
|
||||
command: 'env PORT=4001 HOST=0.0.0.0 yarn run dev'
|
||||
|
||||
volumes:
|
||||
rubygems:
|
|
@ -271,6 +271,9 @@ inspect(object, opts \\ [])
|
|||
```elixir
|
||||
value |> IO.inspect()
|
||||
```
|
||||
```elixir
|
||||
value |> IO.inspect(label: "value")
|
||||
```
|
||||
|
||||
## Numbers
|
||||
|
||||
|
@ -686,8 +689,8 @@ exp = ~r/hello/i
|
|||
```elixir
|
||||
~r/regexp/
|
||||
~w(list of strings)
|
||||
~s[strings with #{interpolation} and \x20 escape codes]
|
||||
~S[no interpolation and no escapes]
|
||||
~s|strings with #{interpolation} and \x20 escape codes|
|
||||
~S|no interpolation and no escapes|
|
||||
~c(charlist)
|
||||
```
|
||||
|
||||
|
|
|
@ -452,7 +452,7 @@ _| _| _|_|_| _| _| _| _|_|_| _|_|_| _| _|_|_| _|
|
|||
```
|
||||
{: .-figlet}
|
||||
|
||||
### caligraphy
|
||||
### calligraphy
|
||||
|
||||
```
|
||||
***** ** *
|
||||
|
|
2
jsdoc.md
2
jsdoc.md
|
@ -79,7 +79,7 @@ function play (song) {
|
|||
|
||||
See: <http://usejsdoc.org/tags-typedef.html>
|
||||
|
||||
### Other keywodrs
|
||||
### Other keywords
|
||||
|
||||
```js
|
||||
/**
|
||||
|
|
1
knex.md
1
knex.md
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
title: Knex
|
||||
category: Hidden
|
||||
layout: 2017/sheet
|
||||
updated: 2017-09-23
|
||||
intro: |
|
||||
|
|
6
osx.md
6
osx.md
|
@ -50,8 +50,8 @@ layout: 2017/sheet
|
|||
- `networksetup` - Configure network (ip, dns, proxy, etc)
|
||||
- `tmutils` - Configure Time Machine (enable/disable, exclude path, delete snapshots, etc)
|
||||
- `mdutils` - Manage Spotlight (enable/disable, exclude, etc)
|
||||
- `diskutil` - Controll disk (format, eject, unmount, etc)
|
||||
- `launchctl` - Controll running "agents"
|
||||
- `diskutil` - Control disk (format, eject, unmount, etc)
|
||||
- `launchctl` - Control running "agents"
|
||||
|
||||
### Useful utils
|
||||
|
||||
|
@ -65,4 +65,4 @@ layout: 2017/sheet
|
|||
- `/usr/libexec/airportd`
|
||||
- `scutil`
|
||||
|
||||
__INFO: `brew` ([link](https://brew.sh)) is highly recomended utility__
|
||||
__INFO: `brew` ([link](https://brew.sh)) is highly recommended utility__
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
title: Pacman
|
||||
category: Linux
|
||||
updated: 2018-07-07
|
||||
intro: |
|
||||
Pacman is the package manager for Arch linux and its derivatives.
|
||||
---
|
||||
|
||||
## Commands
|
||||
{: .-three-column}
|
||||
|
||||
### Common commands
|
||||
|
||||
| Command | Description |
|
||||
| ----------------------- | --------------------------------- |
|
||||
| `pacman -Syu <pkg>` | Install (and update package list) |
|
||||
| `pacman -S <pkg>` | Install only |
|
||||
| `pacman -Rsc <pkg>` | Uninstall |
|
||||
| `pacman -Ss <keywords>` | Search |
|
||||
| `pacman -Syu` | Upgrade everything |
|
||||
{: .-prime}
|
||||
|
||||
### Query
|
||||
|
||||
| Command | Description |
|
||||
| -------------------- | -------------------------------------- |
|
||||
| `pacman -Qe` | List explictly-installed packages |
|
||||
| --- | --- |
|
||||
| `pacman -Ql <pkg>` | What files does this package have? |
|
||||
| `pacman -Qii <pkg>` | List information on package |
|
||||
| --- | --- |
|
||||
| `pacman -Qo <file>` | Who owns this file? |
|
||||
| --- | --- |
|
||||
| `pacman -Qs <query>` | Search installed packages for keywords |
|
||||
|
||||
### Orphans
|
||||
|
||||
| Command | Description |
|
||||
| ----------------------------- | --------------------------- |
|
||||
| `pacman -Qdt` | List unneeded packages |
|
||||
| `pacman -Rns $(pacman -Qdtq)` | Uninstall unneeded packages |
|
||||
|
||||
Avoid orphans by using `pacman -Rsc` to remove packages, which will remove unneeded dependencies.
|
||||
|
||||
### Other
|
||||
|
||||
| Command | Description |
|
||||
| ------------------ | -------------------------- |
|
||||
| `pactree <pkg>` | What does _pkg_ depend on? |
|
||||
| `pactree -r <pkg>` | What depends on _pkg_? |
|
||||
|
||||
### References
|
||||
|
||||
* [Pacman tips and tricks](https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks) _(wiki.archlinux.org)_
|
2
pass.md
2
pass.md
|
@ -23,7 +23,7 @@ $ pass insert [-m] twitter.com/rsc
|
|||
$ pass generate [-n] twitter.com/rsc length
|
||||
```
|
||||
|
||||
### Retreive
|
||||
### Retrieve
|
||||
|
||||
``` bash
|
||||
$ pass ls twitter.com/
|
||||
|
|
2
pm2.md
2
pm2.md
|
@ -26,7 +26,7 @@ updated: 2018-03-15
|
|||
| `pm2 jlist` | Print process list in raw JSON |
|
||||
| `pm2 prettylist` | Print process list in beautified JSON |
|
||||
| --- | --- |
|
||||
| `pm2 describe 0` | Display all informations about a specific process |
|
||||
| `pm2 describe 0` | Display all information about a specific process |
|
||||
| --- | --- |
|
||||
| `pm2 monit` | Monitor all processes |
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ category: Rails
|
|||
# Before/after filters
|
||||
around_filter :wrap_in_transaction
|
||||
def wrap_in_transaction(&blk)
|
||||
ActiveRecord::Base.transation { yield }
|
||||
ActiveRecord::Base.transaction { yield }
|
||||
end
|
||||
|
||||
### HTTP basic authentication
|
||||
|
|
|
@ -505,7 +505,7 @@ Article.joins(:category, :comments)
|
|||
```
|
||||
|
||||
```ruby
|
||||
# Nested assocations
|
||||
# Nested associations
|
||||
Article.joins(comments: :guest)
|
||||
```
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ npm install -D rollup
|
|||
|
||||
You may need to use `./node_modules/.bin/rollup` as a command if you did not install rollup globally.
|
||||
|
||||
### Mutiple outputs
|
||||
### Multiple outputs
|
||||
|
||||
#### rollup.config.js
|
||||
|
||||
|
@ -106,7 +106,7 @@ import resolve from 'rollup-plugin-node-resolve'
|
|||
|
||||
export default {
|
||||
input: 'src/main.js',
|
||||
ouptut: {
|
||||
output: {
|
||||
file: 'bundle.js',
|
||||
format: 'cjs'
|
||||
},
|
||||
|
|
8
vim.md
8
vim.md
|
@ -52,6 +52,12 @@ Getting started
|
|||
| `$` | End of line |
|
||||
{: .-shortcuts}
|
||||
|
||||
#### Character
|
||||
|
||||
| `fc` | Go forward to character `c` |
|
||||
| `Fc` | Go backward to character `c` |
|
||||
{: .-shortcuts}
|
||||
|
||||
#### Document
|
||||
|
||||
| Shortcut | Description |
|
||||
|
@ -134,7 +140,7 @@ Operators
|
|||
### Usage
|
||||
{: .-prime}
|
||||
|
||||
Operators let you operate in a range of text (defined by *motion*). These are preformed in normal mode.
|
||||
Operators let you operate in a range of text (defined by *motion*). These are performed in normal mode.
|
||||
{: .-setup}
|
||||
|
||||
| `d` | `w` |
|
||||
|
|
Loading…
Reference in New Issue