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
| var deps = require('./getModuleDeps'); | |
| console.table(deps('myModule')); | |
| /* Example output (ASCII-fied) | |
| -------------------------------------------------------------- | |
| | (index) | provider | type | name | | |
| |---------|--------------------|-------------|---------------| | |
| | 0 | "$compileProvider" | "directive" | "myDirective" | |
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
| function List () {} | |
| List.prototype = [] | |
| List.prototype.constructor = List | |
| List.prototype._return = function _return (val) { | |
| if (val.length <= 1) | |
| val = val[0] | |
| return val | |
| } |
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
| <html> | |
| <head> | |
| <style> | |
| /* We're using floats to prevent spaces from appearing between | |
| * the elements that make up the URL. Alternatives include flex, | |
| * or simply removing the spaces form the HTML. See this link | |
| * for more information: | |
| * https://css-tricks.com/fighting-the-space-between-inline-block-elements/ | |
| */ | |
| .url-wrap span { |
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
| /* | |
| Theme Name: Black n White | |
| Theme URI: http://zacklive.com/new-black-and-white-wordpress-theme/300/ | |
| Description: A black and white WordPress Theme, simple and elegant design, widget ready with right sidebar. Fixed the sidebar bug. With control panel, you can set your own RSS feed and header logo. Wordpress 2.7 compatible, Supporting threaded (nested) comments, sticky-post and comment pages. | |
| Version: 2.0.1 | |
| Author: Zack | |
| Author URI: http://zacklive.com/ | |
| Tags: black, white, two-columns, fixed-width, threaded-comments, sticky-post | |
| Chang Log: | |
| 14/Aug/2009: Control panel added. |
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
| /*-------------------------------------------------------------- | |
| >>> TABLE OF CONTENTS: | |
| ---------------------------------------------------------------- | |
| // 0 - Bootstrap variables and mixins | |
| 1.0 - Reset | |
| 2.0 - Typography | |
| 3.0 - Elements | |
| 4.0 - Utilities | |
| 5.0 - Main | |
| 5.1 - Structure |
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
| // http://ejohn.org/blog/objectgetprototypeof/ | |
| function instanceOf(object, constructor) { | |
| while (object != null) { | |
| if (object == constructor.prototype) { | |
| return true; | |
| } | |
| object = Object.getPrototypeOf(object); | |
| } | |
| return false; | |
| } |
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
| // name - human readable name for the bit field | |
| // index - Bit offset for the field (zero based) | |
| function BitField(name, index) { | |
| this.name = name; | |
| this.index = Math.pow(2, parseInt(index)); | |
| } | |
| BitField.prototype.valueOf = function valueOf() { | |
| return this.index; | |
| }; |
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
| // == PARENT =================================================================== | |
| // CONSTRUCTOR | |
| // For this demo we'll be inheriting from the Parent class | |
| function Parent() {} | |
| // METHODS | |
| Parent.prototype.foo = function foo() { | |
| return 'FOO'; | |
| } |
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
| { | |
| if (window.runTTS === undefined) { | |
| const MAX_TRIES = 20; | |
| const TRY_DELAY = 100; | |
| /* Adjust voice speed. Default = 1 */ | |
| if (navigator.userAgent.includes("Macintosh")) { | |
| window.ttsPlaybackSpeed = 1.2; | |
| } else if (navigator.userAgent.includes("Windows")) { | |
| window.ttsPlaybackSpeed = 5; | |
| } else { |
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
| var sourceObject = { foo: { bar: { baz: { qux: { value: "Hit!" } } } } }; | |
| function lookup(targetObject, targetPath) { | |
| const name = 'o'; | |
| const properties = []; | |
| const segments = targetPath.split('.'); | |
| for (let i = 1; i <= segments.length; i++) { | |
| const current = `${name}.${segments.slice(0, i).join('.')}`; | |
| properties.push(current); |