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
| /** | |
| * Convert String to Emoji | |
| * Most emoji's start with � | |
| * If you have these in your SFCC Site Import XML File, you might get an import error. | |
| * | |
| * @usage convertStringToEmoji('��') => 🙂 | |
| * @param {String} str Raw URL Encoded String | |
| */ | |
| function convertStringToEmoji(str) { | |
| // Regex matching either a surrogate or a character. |
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
| 2teams() { | |
| NOW=$(date +"%Y-%m-%d_%H%M") | |
| if [ ! -z $2 ] ; then | |
| echo $NOW"_"$2.mp4 | |
| ffmpeg -i $1 -codec copy $NOW"_"$2.mp4 | |
| else | |
| echo $NOW"_teamsvid".mp4 | |
| ffmpeg -i $1 -codec copy $NOW"_teamsvideo".mp4 | |
| fi | |
| } |
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
| 'use strict'; | |
| // Add ECMA262-5 method binding if not supported natively | |
| // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind | |
| if (!Function.prototype.bind) { | |
| Function.prototype.bind = function (oThis) { | |
| if (typeof this !== "function") { | |
| // closest thing possible to the ECMAScript 5 internal IsCallable function | |
| throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); | |
| } |
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
| <NotepadPlus> | |
| <UserLang name="log4j_dark" ext="log" udlVersion="2.1"> | |
| <Settings> | |
| <Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> | |
| <Prefix Keywords1="no" Keywords2="yes" Keywords3="no" Keywords4="yes" Keywords5="no" Keywords6="yes" Keywords7="no" Keywords8="no" /> | |
| </Settings> | |
| <KeywordLists> | |
| <Keywords name="Comments"></Keywords> | |
| <Keywords name="Numbers, prefix1"></Keywords> | |
| <Keywords name="Numbers, prefix2"></Keywords> |
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
| //Chain of responsibility design pattern | |
| //Use strategyPipeline.handleRequest(request) | |
| //to send the request to be handled along the | |
| //chain-of-responsibility | |
| var strategyPipeline = { | |
| handleRequest: function(request){ | |
| var strategy1 = new Strategy1(); | |
| var strategy2 = new Strategy2(); |
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
| <NotepadPlus> | |
| <UserLang name="LogFile" ext="log"> | |
| <Settings> | |
| <Global caseIgnored="yes" /> | |
| <TreatAsSymbol comment="no" commentLine="no" /> | |
| <Prefix words1="no" words2="no" words3="no" words4="no" /> | |
| </Settings> | |
| <KeywordLists> | |
| <Keywords name="Delimiters">[(0])0</Keywords> | |
| <Keywords name="Folder+"></Keywords> |
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
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |