- Custom Elements
- Shadow DOM
- HTML Imports
- HTML Templates
I'm confused as to which bits I need supported. Do I need all of them to blindy create and use other components?
" | |
".vimrc File | |
"Written by Jack Franklin | |
"A lot of this came from Jeffrey Way's video tutorials & his .vimrc file | |
"(jeffrey-way.com, net.tutsplus.com) | |
" | |
"Tabs | |
set tabstop=4 | |
set shiftwidth=4 |
const User = props => <p>This would render a user</p> | |
class Users extends React.Component { | |
// has this.state.users which is an array from an API | |
// not gonna bother writing the code to fetch that... | |
render() { | |
return ( | |
<div> | |
<h2>The users</h2> | |
<ul> |
case 'TOGGLE_TODO': | |
const todos = state.todos.map((todo) => { | |
if (todo.id === action.id) { | |
todo.done = !todo.done; | |
} | |
return todo; | |
}); | |
return { todos }; |
var foo = function() { | |
return 2; | |
} | |
var x = foo; | |
var y = foo(); | |
// now x is a reference to the foo function | |
// whereas with y we called (or "invoked") foo, meaning y is set to foo's return value, 2. |
Often I jump from Vim -> Command Line by backgrounding Vim with Ctrl-Z
, doing my CLI stuff, and then going back to Vim with vi
(which is just aliased to vim
).
Sometimes though, I'll forget about my backgrounded Vim, and end up having another Vim process running.
How can I make my vi
alias work such that:
vim
as normal.Thanks in advance!
var person = {}; | |
Object.defineProperty(person, 'firstName', { | |
get: function() { return firstName; }, | |
set: function(newName) { firstName = newName; }, | |
enumerable: true | |
}); | |
Object.defineProperty(person, 'lastName', { | |
get: function() { return lastName; }, |
gulp.task("concat", function() { | |
var stream = gulp.src("./src/*.js") | |
.pipe(concat("concat.js")) | |
.pipe(gulp.dest("./tmp/")); | |
return stream; | |
}); | |
gulp.task("uglify", ["concat"], function() { | |
gulp.src("./tmp/concat.js") | |
.pipe(uglify()) |
I'd like to write a small shell script that takes the output of the `jobs` command, which looks like so: | |
[1] - suspended vim | |
[2] + suspended less foo.txt | |
And have it return a string like: | |
(1:vim 2:less foo.txt) | |
So I can add that to my PROMPT. |
// I have this code for downloading a URL to a file | |
var stream = request(url).pipe(fs.createWriteStream(fileDestination)) | |
// I can bind to "close" for when the file is completely downloaded, which works fine | |
stream.on("close", function() {...}); | |
// is there an event I can bind to that will be fired whenever data is receieved (so not that the file is 100% done, but that a bit more of the file has been downloaded? | |
stream.on("???", function() {...}); |