const array = ['one', 'two', 'three'];
or
const array = new Array('one', 'two', 'three');
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @jsx jsx */ | |
import { jsx } from '@emotion/core'; | |
import { Box } from '@chakra-ui/core'; | |
import PropTypes from 'prop-types'; | |
import React from 'react'; | |
function Template({ children, ...props }) { | |
return ( | |
<React.Fragment> |
node -e "console.log(require('crypto').randomBytes(256).toString('base64'));"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zh-HK: | |
devise: | |
failure: | |
invited: "你有一個待處理的邀請, 請接受它以完成創建您的帳戶。" | |
invitations: | |
send_instructions: "邀請電子郵件已發送到%{email)。" | |
invitation_token_invalid: "提供嘅邀請令牌無效!" | |
updated: "你嘅密碼設置成功。 你而家已經登錄。" | |
updated_not_active: "你嘅密碼設置成功。" | |
no_invitations_remaining: "冇剩餘邀請" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled files | |
*.tfstate | |
*.tfstate.backup | |
*.tfstate.lock.info | |
# logs | |
*.log | |
# Directories | |
.terraform/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root = true | |
[*] | |
charset = utf-8 | |
indent_size = 2 | |
indent_style = space | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
[*.md] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class [Your Class Here] < ActiveRecord::Base | |
################################################################################################## | |
### Attributes ################################################################################### | |
################################################################################################## | |
### Constants #################################################################################### | |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}'
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install bootstrap as a dev dependency, and its dependencies (node-sass and sass-loader) | |
`npm install --save-dev [email protected] node-sass sass-loader` | |
2. Install nuxt plugin of bootstrap vue (includes bootstrap-vue as a dependency) | |
`npm install @nuxtjs/bootstrap-vue` | |
3. Register plugin as module in nuxt.config.js (see below) | |
4. Create app.scss entry point (see below) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
indent_size = 2 | |
indent_style = space | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
NewerOlder