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", |
// check version | |
node -v || node --version | |
// list locally installed versions of node | |
nvm ls | |
// list remove available versions of node | |
nvm ls-remote | |
// install specific version of node |
<?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); | |
} |
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.
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)
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.