Most basic example to center and scale your map with d3.geoBounds(), d3.geoCentroid() and d3.geoDistance().
{ | |
"name": "wordpress-search-react", | |
"version": "1.0.0", | |
"description": "Powering WordPress Search with React and REST API", | |
"main": "assets/js/public.js", | |
"scripts": { | |
"build": "webpack", | |
"watch": "webpack --watch", | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, |
"overrides": { | |
"bootstrap": { | |
"main": [ | |
"./scss/_variables.scss", | |
"./scss/_mixins.scss", | |
"./scss/_custom.scss", | |
"./scss/_normalize.scss", | |
"./scss/_print.scss", | |
"./scss/_reboot.scss", | |
"./scss/_type.scss", |
<?php | |
function get_tls_version($sslversion = null) | |
{ | |
$c = curl_init(); | |
curl_setopt($c, CURLOPT_URL, "https://www.howsmyssl.com/a/check"); | |
curl_setopt($c, CURLOPT_RETURNTRANSFER, true); | |
if ($sslversion !== null) { | |
curl_setopt($c, CURLOPT_SSLVERSION, $sslversion); | |
} |
Spacer functions for Bootstrap 4 α3
The spacer functions include these measurements:
- 0.5 => m-*-h
- 1 => m-*-1
- 1.5 => m-*-1h
- 2 => m-*-2
- 3 => m-*-3
- 4 => m-*-4
WP Geo Query
Quick and easy class created to modify the WP_Query on specific calls and pull in all posts within a radius from a given latitude and longitude.
Efficient font stack with Sass
The strength of Sass is the mixins and functions. Being able to automate many of the repetitive coding for CSS is both amazing in building and maintaining a clean and efficient code. I often find many developers creating complex systems for simple tasks, such as managing a font stack. This can be tedious to set up and employ. In this article, I will explain how I automate this system.
The font stack is one of those problems which are often solved by simple variables. In this instance, it makes a lot of sense and is easy enough to work with. But when you work with our (beloved) designers from Dogstudio, you can be sure of having to use lot of font variants. It quickly happens that I do not remember all the properties of each variants. And when I say "use lot of font variants", I mean at least 15 in most cases.
Sass maps to the rescue
Instead of simply define variables, I will ceate a font stack map and a mixin to use the map easily.
Easy example on how to put marker on a d3.js map.
You got 2 options:
- using d3.geo.path() which does all the work for you
- using svg circles and translating them via projection(d.geometry.coordinates)
Using Git to Manage a Live Web Site
Overview
As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.
Contents
function ConvertGoogleDocToCleanHtml() { | |
var body = DocumentApp.getActiveDocument()//.getBody(); | |
var numChildren = body.getNumChildren(); | |
var output = []; | |
var images = []; | |
var listCounters = {}; | |
var toc = {} | |
for (var i = 0; i < numChildren; i++) { | |
var p = body.getChild(i); |