- Generate new rails app using
--webpack
flag
rails new myApp --webpack=vue
Note:
- You can use
--webpack=angular
for angular application and--webpack=react
for react.
// Lighten a colour | |
@function tint($color, $percentage) { | |
@return mix(white, $color, $percentage); | |
} | |
// Darken a colour | |
@function shade($color, $percentage) { | |
@return mix(black, $color, $percentage); | |
} |
#include <iostream> | |
using namespace std; | |
struct node { | |
int data; | |
node* left; | |
node* right; | |
node() { | |
left = NULL; |
export default function ({$axios, app}) { | |
$axios.onResponseError(error => { | |
const code = parseInt(error.response && error.response.status); | |
let originalRequest = error.config; | |
if ([401, 403].includes(code)) { | |
originalRequest.__isRetryRequest = true; | |
let refresh_token = app.$auth.getRefreshToken(app.$auth.$storage.state.strategy).replace('Bearer ', ''); |
JavaScript is one of the top programming languages today. It can also be confusing for developers coming from C, Java or PHP backgrounds. Worse still are the numerous frameworks (such as Angular and React) that make it difficult to decide what to learn and how to use the language.
In this short talk/demo, we'll look at the best practices in JavaScript programming. We'll explain using simple examples. This is for beginners and intermediate JS programmers. You must be familiar with JS syntax. We'll not cover DOM access, jQuery, Node.js or JS frameworks.
The recommendations here assume that you use a transpiler such as Babel so that code can work on older browsers. Therefore we freely use syntax from recent ECMAScript standards.
I followed the instructions in this blog post Multiple Fonts: Alternative to Operator Mono in VSCode, but did not see any changes made to VS Code. After digging a bit, I discovered that all the CSS class names had changed. They’re now e.g. .mtk13, .mtk16 { … }
.
{ "vscode_custom_css.imports": [ "file:///Users/Brian/Desktop/vscode-style.css" ] }
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |
# These aliases have been collected and shown in the making of this video, explaining how to set up and use git alises | |
# Source: https://youtu.be/Uk4GnYoQx_I | |
[alias] | |
# Shortcuts | |
ch = checkout | |
br = branch | |
st = status | |
br = branch | |
cm = commit -m |