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 { | |
| server_name {DOMAINS}; | |
| # include snippets/security.conf; | |
| rewrite ^/(.*)/$ /$1 permanent; | |
| # if ($redirect_uri ) { | |
| # return 301 $redirect_uri; | |
| # } |
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
| <?php | |
| function customSort($arr) { | |
| $keys = array_count_values($arr); | |
| $newsort = []; | |
| $conc = []; | |
| $output = ""; | |
| asort($keys); | |
| foreach($keys as $k => $v) { |
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
| <?php | |
| /* | |
| * In configuration file | |
| * ... | |
| * 'as AccessBehavior' => [ | |
| * 'class' => 'app\components\AccessBehavior', | |
| * 'allowedRoutes' => [ | |
| * '/', | |
| * ['/user/registration/register'], |
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
| {"0.8822604255837376":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMEVP5a8Yf+2saCjROO0AtEPARapBfL6/kZ\r\nIOKM4+13G3zka3DElLhK/ZgmcWYcvN73dKNMDU2e7DZORAQm+y8XsM3/AAAACDxn\r\naXRodWI+wv8AAACOBBATCABA/wAAAAWCWKiU2v8AAAACiwn/AAAACZDUFKwQxQIN\r\nWP8AAAAFlQgJCgv/AAAABJYDAQL/AAAAApsD/wAAAAKeAQAA8FsA/R/xvIre7JBL\r\n/x3IL5Bjc0WVtsAVhg1LmLDUtyMxu1QcAP9Hag9IOBlTYM5//Zp4/DOMlZ92hSJc\r\naKp6R6gg41ACa87/AAAAVgQAAAAAEggqhkjOPQMBBwIDBCsjY3VVoK/F8mGuGtIu\r\nY7w3U5Hl5l1PTsv/ME2nnFIzm9dNYB3Qc/wyU9Cy+cF+jMRM/K30TeGKbF6MbzZZ\r\nHg0DAQgHwv8AAABtBBgTCAAf/wAAAAWCWKiU2v8AAAAJkNQUrBDFAg1Y/wAAAAKb\r\nDAAAGw4BAJjBytKi/VYMCk63lC6yXO7DSBKUJeX5kmzwjRL8tKmlAQDTB1Ib0Ava\r\n00dJbfg98Jji2bO934c6/mN4CUj0pr1d7Q==\r\n=Y6vR\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n","0.11858526110278289":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMEVP5a8Yf+2saCjROO0AtEPARapBfL6/kZ\r\nIOKM4+13G3zka3DElLhK/ZgmcWYcvN73dKNMDU2e7DZORAQm+y8XsM3/AAAACDxn\r\naXRodWI+wv8AAACOB |
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
| <test></test> |
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
| public struct function xmlToJSON(required xml doc) { | |
| var s = {}; | |
| var x = arguments.doc | |
| if(xmlGetNodeType(x) == "DOCUMENT_NODE") { | |
| s[structKeyList(x)] = xmlToJson(x[structKeyList(x)]); | |
| } else { | |
| if(structKeyExists(x, "xmlAttributes") && !structIsEmpty(x.xmlAttributes)) { | |
| for(var item in x.xmlAttributes) { | |
| s[item] = x.xmlAttributes[item]; |
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'?> | |
| <!-- | |
| Licensed to the Apache Software Foundation (ASF) under one or more | |
| contributor license agreements. See the NOTICE file distributed with | |
| this work for additional information regarding copyright ownership. | |
| The ASF licenses this file to You under the Apache License, Version 2.0 | |
| (the "License"); you may not use this file except in compliance with | |
| the License. You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
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 / VIRTUAL HOST | |
| # Sample using railo.conf | |
| # | |
| # SERVER INSTANCE / VIRTUAL HOST | |
| server { | |
| listen 80; | |
| server_name yourdomain.tld; |
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
| location / { | |
| try_files $uri $uri/ @rewrites; | |
| } | |
| location @rewrites { | |
| # Can put some of your own rewrite rules in here | |
| # for example rewrite ^/~(.*)/(.*)/? /users/$1/$2 last; | |
| rewrite ^/(.*)? /index.cfm/$1 last; | |
| rewrite ^ /index.cfm last; | |
| } |
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 Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
NewerOlder