Put this file code
in C:\Users\<username>\AppData\Local\Code\bin
aside code.cmd
.
Assuming this path is already in your %PATH%
you can now run the command to open a file
code file.txt
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
// Approach 1: Use React.createClass | |
var HelloWorld = React.createClass({ | |
getInitialState() { | |
return { message: 'Hi' }; | |
}, | |
logMessage() { | |
// this magically works because React.createClass autobinds. | |
console.log(this.state.message); | |
}, |
import React from "react"; | |
import { render } from "react-dom"; | |
const ParentComponent = React.createClass({ | |
getDefaultProps: function() { | |
console.log("ParentComponent - getDefaultProps"); | |
}, | |
getInitialState: function() { | |
console.log("ParentComponent - getInitialState"); | |
return { text: "" }; |
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
OP: @leonardofed founder @ plainflow.
# remove specific file from git cache | |
git rm --cached filename | |
# remove all files from git cache | |
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore is now working" |
#!/bin/bash | |
files=$(git diff --cached --name-only | grep '\.js$') | |
# Prevent ESLint help message if no files matched | |
if [[ $files = "" ]] ; then | |
exit 0 | |
fi | |
echo $files | xargs eslint |
# Centos 7.3 comes with 1.8.3 | |
# so update git from centos repo | |
yum update git | |
# it shows nothing to update | |
# we download git source and build and install latest git on Centos 7.3 |