Skip to content

Instantly share code, notes, and snippets.

@igorbenic
igorbenic / package.json
Last active January 8, 2021 10:44
Powering the WordPress Search with React and REST API | https://www.ibenic.com/wordpress-react-search
{
"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"
},
@LuisSevillano
LuisSevillano / README.md
Created October 7, 2017 23:07
Center and Scale your map
@folbert
folbert / Bootstrap overrides for Sage 8.5.1 and Bootstrap 4 alpha 6
Last active April 24, 2019 00:00
Add this to bower.json and remove what you don't need
"overrides": {
"bootstrap": {
"main": [
"./scss/_variables.scss",
"./scss/_mixins.scss",
"./scss/_custom.scss",
"./scss/_normalize.scss",
"./scss/_print.scss",
"./scss/_reboot.scss",
"./scss/_type.scss",
@chranderson
chranderson / nvmCommands.js
Last active April 18, 2024 12:46
Useful NVM commands
// 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);
}
@ikonikre
ikonikre / about.md
Last active November 8, 2016 16:33
Bootstrap 4 spacer variables with sizes 'half' and '4' included.

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
@jackabox
jackabox / WPGeoQuery.md
Last active September 8, 2023 08:07
WordPress Geo Location Query

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.

@fabricelejeune
fabricelejeune / Efficient font stack with Sass.md
Last active March 16, 2023 23:52
Efficient font stack with Sass

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.

@cpietsch
cpietsch / README.md
Last active December 30, 2023 04:16
d3.js map with markers

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)
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active April 3, 2024 06:29
Using Git to Manage a Live Web Site

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