Last active
February 12, 2016 20:41
-
-
Save adowning/65ae86e93a613a67119e to your computer and use it in GitHub Desktop.
webstorm live templates
This file contains hidden or 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
| clog | |
| console.log('$PARAM$ ' + $END$); | |
| fbget | |
| var ref = new Firebase(FURL + 'jobs'); | |
| ref.once("value", function (snapshot) { | |
| snapshot.forEach(function (childSnapshot) { | |
| var key = childSnapshot.key(); | |
| var childData = childSnapshot.val(); | |
| if (json.items[0].orderNumber == childData.orderNumber) { | |
| } | |
| }); | |
| }); | |
| ajax | |
| $.ajax({ | |
| type: "GET", | |
| url: "https://api.servicemonster.net/v1/orders?q=" + job.id, | |
| contentType: "application/json; charset=utf-8", | |
| dataType: "json", | |
| error: function (error) { | |
| console.log(error) | |
| }, | |
| beforeSend: function (xhr) { | |
| xhr.setRequestHeader("Authorization", "Basic ZTZleGc0Nkw6bUM0RHM5MXFnZXdPUzFv"); | |
| }, | |
| complete: function (json) { | |
| }, | |
| success: function (json) { | |
| } | |
| }); | |
| for - Loop 'for' with index | |
| len = $ARRAY$.length; | |
| for ($INDEX$ = 0; $INDEX$<len; $INDEX$ += 1) { | |
| $VAR$ = $ARRAY$[$INDEX$]; | |
| $END$ | |
| } | |
| ife - 'if-else' statement | |
| if ($CONDITION$) { | |
| $END$ | |
| } else { | |
| } | |
| try - 'try-catch' statement | |
| try { | |
| $END$ | |
| } catch (err) { | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment