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
SELECT name, COUNT(*) c FROM table GROUP BY name HAVING c > 1; |
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] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |
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
#user nobody; | |
worker_processes 5; | |
error_log logs/error.log; | |
pid logs/nginx.pid; | |
events { | |
worker_connections 4096; | |
} | |
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 isPalindrome(str) { | |
str = str.match(/[A-Za-z0-9]/gi).join("").toLowerCase(); | |
for(var i = 0; i < Math.floor(str.length/2); i++) { | |
if(str.charAt(i) !== str.charAt(str.length-i-1)) { | |
return false; | |
} | |
} | |
return true; | |
} |
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 removeString(arr){ | |
for(var i = arr.length-1; i--;){ | |
if (typeof arr[i] === 'string') | |
arr.splice(i, 1); | |
} | |
} |
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 removeOdd(arr){ | |
for(var i = arr.length-1; i--;){ | |
if (arr[i]%2 !== 0) | |
arr.splice(i, 1); | |
} | |
} |
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 default_server; | |
server_name _; | |
root c:/nginx/html; | |
location / { | |
index index.php index.html index.htm; | |
} | |
error_page 500 502 503 504 /50x.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
server { | |
listen 443 ssl http2; | |
server_name telingadigital.dev www.telingadigital.dev; | |
root c:/nginx/html/telingadigital/public/; | |
# SSL Conf | |
ssl_certificate c:/nginx/ssl/td.dev.pem; | |
ssl_certificate_key c:/nginx/ssl/td.dev.key; |
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 443 ssl; | |
server_name node.dev www.node.dev; | |
# SSL Conf | |
ssl_certificate c:/nginx/ssl/node.dev.pem; | |
ssl_certificate_key c:/nginx/ssl/node.dev.key; | |
ssl_session_cache shared:SSL:1m; | |
ssl_session_timeout 5m; |
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 convert($string) { | |
return strtolower(preg_replace(['/([a-z\d])([A-Z])/', '/([^_])([A-Z][a-z])/'], '$1_$2', $string)); | |
} | |
echo convert('AnyStringAvailable'); |
NewerOlder