portalzine / PenPot - iFrame / Cors Usage
0 좋아요
0 포크
1 파일
마지막 활동 1 day ago
| 1 | # Docker PENPOT_FRONTEND_FLAGS |
| 2 | # https://github.com/penpot/penpot/discussions/1085 |
| 3 | enable-cors |
| 4 | |
| 5 | # NGINX |
| 6 | # Remove any existing: |
| 7 | # add_header X-Frame-Options SAMEORIGIN; |
| 8 | |
| 9 | # If the upstream app sends X-Frame-Options: |
| 10 | proxy_hide_header X-Frame-Options; |
portalzine / HTMX - Process on DOM changes
0 좋아요
0 포크
1 파일
마지막 활동 2 months ago
| 1 | const observer = new MutationObserver((mutations) => { |
| 2 | mutations.forEach((mutation) => { |
| 3 | mutation.addedNodes.forEach((node) => { |
| 4 | if (node.nodeType === 1 && !node["htmx-internal-data"]) { |
| 5 | htmx.process(node) |
| 6 | } |
| 7 | }) |
| 8 | }) |
| 9 | }) |
| 10 | observer.observe(document, {childList: true, subtree: true}) |
portalzine / Protect access to log and sql files
0 좋아요
0 포크
1 파일
마지막 활동 2 months ago
| 1 | # protect access to log and sql files. |
| 2 | <FilesMatch "\.(log|sql)(\.(t?gz|tar|gz|tar\.gz|7z|rar|bz2))?$"> |
| 3 | <IfModule mod_authz_core.c> |
| 4 | Require all denied |
| 5 | </IfModule> |
| 6 | <IfModule !mod_authz_core.c> |
| 7 | Order deny,allow |
| 8 | Deny from all |
| 9 | </IfModule> |
| 10 | </FilesMatch> |
portalzine / Extract text between two tags (domDocument)
0 좋아요
0 포크
1 파일
마지막 활동 2 months ago
| 1 | $tag = "p"; |
| 2 | $html ="I am here!"; |
| 3 | $dom = new domDocument('1.0', 'utf-8'); |
| 4 | $dom->loadHTML($html); |
| 5 | $dom->preserveWhiteSpace = false; |
| 6 | |
| 7 | $findTag = $dom->getElementsByTagName($tag); |
| 8 | |
| 9 | echo $findTag->item(0)->nodeValue; |
portalzine / Randomly reorder a list
0 좋아요
0 포크
1 파일
마지막 활동 2 months ago
| 1 | var reorder = function(selector){ |
| 2 | var ul = document.querySelector(selector); |
| 3 | for (var i = ul.children.length; i >= 0; i--) { |
| 4 | ul.appendChild(ul.children[Math.random() * i | 0]); |
| 5 | } |
| 6 | |
| 7 | } |
다음 항목
이전 항목