Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

James Graham jamesgraham

💭
I may be slow to respond.
View GitHub Profile
@impeto
impeto / Star Rating Component For Laravel Spark.md
Last active May 18, 2018
A Star Rating Vue.js component for Laravel Spark (or any other Vue.js project, really)
View Star Rating Component For Laravel Spark.md

The Vue component

Vue.component('star-component', {
    props: ['sparkForm'],

    data(){
        return {
            stars: 5,
            hover: 5
        };
@domenic
domenic / promises.md
Last active Jul 5, 2020
You're Missing the Point of Promises
View promises.md

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
    // the rest of your code goes here.
You can’t perform that action at this time.