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
| /*jslint white:true */ | |
| /*global console */ | |
| function lastFridayOfMonth(year, month) { "use strict"; | |
| var lastDay = new Date(year, month+1, 0); | |
| if(lastDay.getDay() < 5) { | |
| lastDay.setDate(lastDay.getDate() - 7); | |
| } | |
| lastDay.setDate(lastDay.getDate() - (lastDay.getDay() -5)); | |
| return lastDay; |
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> | |
| <body class="flex-container"> | |
| <script src="https://accounts.google.com/gsi/client" async defer></script> | |
| <div id="buttonDiv" class="flex-item"></div> | |
| <pre id="stuff" class="flex-item"></pre> | |
| </body> | |
| </html> |
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
| <div id="container"> | |
| </div> |
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
| /*jslint plusplus:true, white:true */ | |
| /*global console:false */ | |
| function secondMonday(year, month) { "use strict"; | |
| var firstDay = new Date(year, month, 1); | |
| if(firstDay.getDay() !== 1) { | |
| firstDay.setDate( | |
| firstDay.getDay() === 0 ? 2 : 9 - firstDay.getDay() | |
| ); | |
| } |
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
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| import XCPlayground | |
| XCPSetExecutionShouldContinueIndefinitely(true) | |
| extension NSMutableURLRequest { | |
| /// Percent escape |
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
| PDFViewerApplication.findController.executeCommand('find', { | |
| query: 'from trace compiled', | |
| highlightAll: true, | |
| phraseSearch: 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
| function wrapText(container, text) { | |
| // Construct a regular expression that matches text at the start or end of a string or surrounded by non-word characters. | |
| // Escape any special regex characters in text. | |
| var textRE = new RegExp('(^|\\W)' + text.replace(/[\\^$*+.?[\]{}()|]/, '\\$&') + '($|\\W)', 'm'); | |
| var nodeText; | |
| var nodeStack = []; | |
| // Remove empty text nodes and combine adjacent text nodes. | |
| container.normalize(); |
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": "Content Script", | |
| "description": "Do you really need a description for that?", | |
| "version": "0.2", | |
| "manifest_version": 2, | |
| "content_scripts": [{ | |
| "run_at" : "document_end", | |
| "matches": [ "*://*.google.com/bookmarks/mark*", "*://*.google.com/bookmarks/lookup*" ], | |
| "js": ["script.js"] | |
| }] |
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
| server { | |
| listen 80; | |
| server_name localhost; | |
| location /api/facet-suggest { | |
| proxy_pass http://facet-suggest:3000/api/facet-suggest; | |
| } | |
| location /api/location { | |
| proxy_pass http://location-search:3000/api/location; |
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://voicesinthedark.com/content.php?iContent=186 | |
| copy($$('img[src*="chapter"]').filter(x => x.parentNode.nextSibling.querySelector('span.listen>a')).map(x => `curl -Lo '${x.nextSibling.innerHTML}'.mp3 '${x.parentNode.nextSibling.querySelector('.listen>a:nth-child(1)')}'`).join('\n')) |
NewerOlder