This file contains 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
<!doctype html> | |
<html ng-app="Demo"> | |
<head> | |
<meta charset="utf-8" /> | |
<title> | |
Using URL Interpolation With $http In AngularJS | |
</title> | |
</head> |
This file contains 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
angular | |
.module('uuidApp', ['lvl.services']) | |
.controller('uuidCtl', ['$scope', 'uuid', function($scope, uuid){ | |
$scope.generateUuid = function() { | |
$scope.new = uuid.new(); | |
$scope.nInfo = new Date(); | |
}; | |
$scope.showEmpty = function() { | |
$scope.empty = uuid.empty(); |
This file contains 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
#!/bin/bash | |
# To create in [.babun/]cygwin/usr/local/bin/subl with chmod +x | |
ARGS="" | |
while test $# -gt 0 | |
do | |
ARGS="$ARGS ${1#/cygdrive/[a-zA-Z]}"; # Remove /cygdrive and disk letter from the path | |
shift | |
done |
This file contains 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
// @private | |
var isObject = (value) => | |
value != null && typeof value === 'object'; | |
/** | |
* @private | |
* Restores the one-level-depth object to the original nested object. | |
* | |
* @param {Array} names: list of keys in the object | |
* @param {any} value: the value of the object to transform |
This file contains 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
/** | |
* @author | |
* David Rivera (jherax) | |
* https://github.com/jherax | |
*/ | |
/* eslint-disable no-bitwise */ | |
/** @private */ | |
const toString = Object.prototype.toString; |
This file contains 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
/** | |
* range() | |
* | |
* Returns an array of numbers between a start number and an end number incremented | |
* sequentially by a fixed number(step), beginning with either the start number or | |
* the end number depending on which is greater. | |
* | |
* @param {number} start (Required: The start number.) | |
* @param {number} end (Required: The end number. If end is less than start, | |
* then the range begins with end instead of start and decrements instead of increment.) |
This file contains 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
!function(root, _, undefined) { | |
var Disposable = root.Disposable = function() { | |
this.disposed = false; | |
}; | |
Disposable.prototype = { | |
_dispose: function() { | |
if (!this.disposed) { | |
this.dispose(); | |
this.disposed = true; |
This file contains 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
import React from 'react'; | |
let lastScrollY = 0; | |
let ticking = false; | |
class App extends React.Component { | |
componentDidMount() { | |
window.addEventListener('scroll', this.handleScroll, true); | |
} |
This file contains 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
/** | |
* Lightweight script to detect whether the browser is running in Private mode. | |
* @returns {Promise<boolean>} | |
* | |
* Live demo: | |
* @see https://output.jsbin.com/tazuwif | |
* | |
* This snippet uses Promises. If you want to run it in old browsers, polyfill it: | |
* @see https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js | |
* |
This file contains 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
Method 1 | |
git config --global core.editor "'c:/program files/sublime text 3/sublime_text.exe' -w" | |
Method 2 | |
git config --global core.editor "subl -n -w" | |
Method 3 | |
$ echo 'alias subl="/cygdrive/c/Program\ Files/Sublime\ Text\ 3/sublime_text.exe"' >> ~/.bashrc |
OlderNewer