Skip to content

Instantly share code, notes, and snippets.

@igorbenic
igorbenic / package.json
Last active Jan 8, 2021
Powering the WordPress Search with React and REST API | https://www.ibenic.com/wordpress-react-search
View package.json
{
"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 Oct 7, 2017
Center and Scale your map
View README.md
@folbert
folbert / Bootstrap overrides for Sage 8.5.1 and Bootstrap 4 alpha 6
Last active Apr 24, 2019
Add this to bower.json and remove what you don't need
View Bootstrap overrides for Sage 8.5.1 and Bootstrap 4 alpha 6
"overrides": {
"bootstrap": {
"main": [
"./scss/_variables.scss",
"./scss/_mixins.scss",
"./scss/_custom.scss",
"./scss/_normalize.scss",
"./scss/_print.scss",
"./scss/_reboot.scss",
"./scss/_type.scss",
View tls_test.php
<?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 Nov 8, 2016
Bootstrap 4 spacer variables with sizes 'half' and '4' included.
View about.md

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 Dec 10, 2020
WordPress Geo Location Query
View WPGeoQuery.md

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.

View Efficient font stack with Sass.md

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 Oct 29, 2020
d3.js map with markers
View README.md

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 Jan 15, 2021
Using Git to Manage a Live Web Site
View Using Git to Manage a Live Web Site.md

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

View gist:90c079d2ee5798ea7f03
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);
You can’t perform that action at this time.