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
| #!/bin/bash | |
| REGISTRY="example-registry.com" | |
| USER="reg-user" | |
| # List of repositories | |
| REPOSITORIES=( | |
| "repository-1" | |
| "repository-2" | |
| "repository-3" |
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
| <!-- markup | |
| header introducing the game and score | |
| canvas, injected through the script --> | |
| <main> | |
| <header> | |
| <h1> | |
| Play ball | |
| </h1> | |
| <h2> |
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
| let dim = [...svg.children].filter(el => el.getBBox).reduce((acc, el) => { | |
| let { x, y, width, height } = el.getBBox(); | |
| if (!acc.min.x || x < acc.min.x) acc.min.x = x; | |
| if (!acc.max.x || x + width > acc.max.x) acc.max.x = x + width; | |
| if (!acc.min.y || y < acc.min.y) acc.min.y = y; | |
| if (!acc.max.y || y + height > acc.max.y) acc.max.y = y + height; | |
| return acc; | |
| }, { min: {}, max: {} }), | |
| viewBox = `${dim.min.x} ${dim.min.y} ${dim.max.x - dim.min.x} ${dim.max.y - dim.min.y}`; | |
| svg.setAttribute("viewBox", viewBox); |
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
| Qure | |
| .wait(1000) | |
| .then(function() { | |
| // executed after 1 second | |
| console.log(1); | |
| }) | |
| .wait(1000) | |
| .then(function() { | |
| // executed after 1 second after previous log |
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> | |
| <title>3rd party script executed in sandbox mode</title> | |
| <script type="text/javascript"> | |
| var code = 'console.log(this);'+ | |
| 'console.log(window);'+ | |
| 'console.log(document);'+ | |
| 'console.log(console);'+ | |
| 'setTimeout(function() {console.log(1);}, 10);'+ |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <configuration> | |
| <system.webServer> | |
| <rewrite> | |
| <rules> | |
| <rule name="WordPress Rule 1 Identical" stopProcessing="true"> | |
| <match url="^index\.php$" ignoreCase="false" /> | |
| <action type="None" /> | |
| </rule> |
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
| // start the timer | |
| var start = Date.now(); | |
| // get the snapshot with a callback function | |
| Defiant.getSnapshot(data, function(snapshot) { | |
| console.log('Created snapshot in '+ (Date.now() - start) +' ms'); | |
| // searching on snapshot created with web worker | |
| var found = JSON.search(snapshot, '//item'); | |
| console.log(found); |
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
| <!-- Defiant template --> | |
| <script type="defiant/xsl-template"> | |
| <xsl:template name="tree"> | |
| <h1>Tree</h1> | |
| <xsl:call-template name="tree-walker"/> | |
| </xsl:template> | |
| <xsl:template name="tree-walker"> |
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
| <!-- Defiant template --> | |
| <script type="defiant/xsl-template"> | |
| <xsl:template name="books_template"> | |
| <h1>Books</h1> | |
| <xsl:for-each select="//book"> | |
| <xsl:sort order="ascending" data-type="number" select="price"/> | |
| <h2><xsl:value-of select="title"/></h2> | |
| Author: <strong><xsl:value-of select="author"/></strong><br/> | |
| Price: <xsl:value-of select="price"/> |
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
| <!-- Defiant template --> | |
| <script type="defiant/xsl-template"> | |
| <xsl:template name="books_template"> | |
| <xsl:for-each select="//movie"> | |
| <xsl:value-of select="title"/><br/> | |
| </xsl:for-each> | |
| </xsl:template> | |
| </script> |
NewerOlder