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 | |
header('Access-Control-Allow-Origin: *'); | |
header("Content-Type: application/json; charset=utf-8"); | |
$url = htmlspecialchars($_GET['url']); | |
if ($url) { | |
$content = file_get_contents($url); | |
} else { | |
$content = 'error'; |
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
const puppeteer = require('puppeteer'); | |
const fs = require('fs'); | |
const util = require('util'); | |
// data | |
const rawdata = fs.readFileSync('plates.json'); | |
const textDecoder = new util.TextDecoder('utf-8'); | |
const stringData = textDecoder.decode(rawdata); | |
const objects = JSON.parse(stringData); | |
console.log(objects); |
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
.form-group.has-required {position:relative;} | |
.form-group.has-required:after { | |
content:'\f069'; | |
font-family:'FontAwesome'; | |
position:absolute; | |
top:1px; | |
right:1px; | |
padding:4px 7px; | |
text-align:center; | |
font-size:8px; |
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 today = moment(); | |
var tomorrow = moment().add(1, 'day'); | |
var isToday = function(input) { | |
return moment(input).isSame(today, 'day'); | |
}; | |
var isTomorrow = function(input) { | |
return moment(input).isSame(tomorrow, 'day'); | |
}; |
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 dataWatcher = setInterval(function() { | |
var dataComplete = false; | |
if (dataCompleteGroups == true && dataCompleteEvents == true) { | |
dataComplete = true; | |
} | |
if (dataComplete) { | |
clearInterval(dataWatcher); | |
// do stuff |
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
/* Masonry */ | |
.masonry {column-count:1; column-gap:1.5em; margin:1.5em auto;} | |
.masonry .item {display:inline-block; margin:0 0 1em; width:100%;} | |
.masonry .item iframe {max-width:100%;} | |
/* Large (lg) and up */ | |
@media (min-width:992px) { | |
.masonry {column-count:2;} | |
} |
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
<style> | |
body:after {content:attr(data-content); | |
</style> | |
$('body').attr('data-content': 'changed body:after content') | |
<body data-content="body:after content"> | |
...content... | |
</body |
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
injectJSFile('../assets/js/script.js'); | |
function injectJSFile(fileURL) { | |
var script = document.createElement('script'); | |
script.src=fileURL; | |
script.type='text/javascript'; | |
document.getElementsByTagName('head')[0].appendChild(script); | |
} |
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 checkExist = setInterval(function() { | |
if ($('#element').length) { | |
console.log("Exists!"); | |
clearInterval(checkExist); | |
} | |
}, 100); // check every 100ms | |
//source: https://stackoverflow.com/a/16149679 |
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
/* Bootstrap 4 Helper CSS */ | |
/* Add-on: Bootstrap 4, hidden-{breakpoint}-{up/down} */ | |
/* taken from Bootstrap 4, alpha 6 */ | |
.hidden-xs-up {display:none!important;} | |
@media (max-width:575px) { .hidden-xs-down {display:none!important;} } | |
@media (min-width:576px) { .hidden-sm-up {display:none!important;} } | |
@media (max-width:767px) { .hidden-sm-down {display:none!important;} } | |
@media (min-width:768px) { .hidden-md-up {display:none!important;} } | |
@media (max-width:991px) { .hidden-md-down {display:none!important;} } |
NewerOlder