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
import Img from "gatsby-image"; | |
import { StaticQuery, graphql } from "gatsby"; | |
import React from "react"; | |
export default props => ( | |
<StaticQuery | |
query={graphql` | |
query { | |
images: allFile { | |
edges { |
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() { | |
var verified = []; | |
document.querySelector('#myselector').onchange = function(e) { | |
if (this.querySelectorAll('option:checked').length <= 3) { | |
verified = Array.apply(null, this.querySelectorAll('option:checked')); | |
} else { | |
Array.apply(null, this.querySelectorAll('option')).forEach(function(e) { | |
e.selected = verified.indexOf(e) > -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
a[href="/login"] { | |
display: none !important; | |
} | |
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
/* | |
Get current Git Branch in PHP | |
See: https://stackoverflow.com/a/7448133/3091226# | |
*/ | |
$stringfromfile = file('.git/HEAD', FILE_USE_INCLUDE_PATH); | |
$firstLine = $stringfromfile[0]; //get the string from the array | |
$explodedstring = explode("/", $firstLine, 3); //seperate out by the "/" in the string | |
$explodedstring = array_slice($explodedstring , 2); | |
$branchname = trim(implode("/", $explodedstring)); |
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 data = $(this).serializeArray().reduce(function(obj, item) { | |
obj[item.name] = item.value; | |
return obj; | |
}, {}); |
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
body { | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | |
} |
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
/* System Fonts as used by Medium and WordPress */ | |
body { | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | |
} |
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
/*! | |
CSS helper to highlight WAI-ARIA landmark roles etc. | |
NDF, 3 December 2013. | |
http://w3.org/TR/wai-aria/roles#landmark_roles | |
Inspiration: https://addons.mozilla.org/en-US/firefox/addon/juicy-studio-accessibility-too/ | |
javascript: | |
(function(){ |
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
<!doctype html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>PHPMapTileDownloader</title> | |
<style> | |
body { | |
font-family: 'Helvetica', sans-serif; | |
text-align: center; | |
margin-top: 20px; |
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 export_csv() { | |
$filename = "file_" . date('Y-m-d'); | |
// get csv data | |
$data = $this->get_csv_data(); // expects: array with lines as array | |
// define header | |
$header = array('col1', 'col2', 'col3'); | |