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
replace javascript object with json | |
:%s/\([A-z0-9]*\):/"\1":/g |
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_flag display_startup_errors on | |
php_flag display_errors on | |
php_value error_reporting -1 | |
php_value upload_max_filesize 20M | |
php_value post_max_size 21M | |
Action application/x-httpd-php70 /cgi-sys/php70-fcgi-starter.fcgi | |
AddType application/x-httpd-php70 .php .php70 |
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
var e = document.createEvent("Events"); | |
e.initEvent("resize", true, true); | |
window.dispatchEvent(e); |
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
var getAbsoluteUrl=function(){ | |
var a;return function(b){return a||(a=document.createElement("a")),a.href=b,a.href} | |
}(); | |
// usage | |
getAbsoluteUrl('/di3'); // https://gist.github.com/di3 |
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 toggle(a){ | |
a.style.display==="none"?a.style.display="block":a.style.display="none" | |
} |
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 text inside element | |
function selectText(e){ | |
var t,n,o=document,a=window,c=o.body,l="unbdefined"; | |
typeof a.getSelection!=l&&typeof o.createRange!=l?(n=o.createRange(),n.selectNodeContents(e),t=a.getSelection(),t.removeAllRanges(),t.addRange(n)) : typeof o.selection!=l&&typeof c.createTextRange!=l&&(n=c.createTextRange(),n.moveToElementText(e),n.select()) | |
} |
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 | |
/* | |
.env | |
APP_ENV=local | |
.local.env | |
APP_DEBUG=true | |
.production.env | |
APP_DEBUG=false | |
*/ |
NewerOlder