Skip to content

Instantly share code, notes, and snippets.

@LuisSevillano
LuisSevillano / .block
Last active October 19, 2019 11:15
New composite border in es-atlas
border:none
height:696
license:MIT
<?php
/**
* This plugin creates a new paragraph entity based on the source.
*
* @MigrateProcessPlugin(
* id = "mds_paragraph"
* )
*/
class ParagraphMigrateProcessor extends ParagraphProcessBase {
@jsanz
jsanz / README.md
Last active May 17, 2018 13:53
Geocode with Mapzen search and Google Spreadsheets

How to set up a quick geocoding system on google spreadsheets.

  1. Create a new spreadsheet
  2. Open the Scripts editor and paste the script attached
  3. Use on your spreadsheet this new formula
=searchMapzen(place_cell,mapzen_api_key)

@geuis
geuis / gist:8b1b2ea57d7f9a9ae22f80d4fbf5b97f
Last active January 10, 2024 16:43
Get Youtube video urls
// Run from the dev tools console of any Youtube video
// Accurate as of July 2, 2020.
//
// Copy and paste this into the dev console in a browser with the desired video loaded.
//
// NOTE: Some Youtube videos do not directly expose the video url in the response.
// This script doesn't currently attempt to handle those. It will work for most other general video types though.
(async () => {
const html = await fetch(window.location.href).then((resp) => resp.text()).then((text) => text);
@kylephillips
kylephillips / most-favorited.php
Last active July 27, 2020 03:11
Favorites for WordPress - Display the most favorited posts
<?php
/**
* Display a list of the 10 most favorited posts
* @see https://wordpress.org/plugins/favorites/
*/
$favorites_query = new WP_Query(array(
'post_type' => array('post'),
'posts_per_page' => 10,
'meta_key' => 'simplefavorites_count',
'orderby' => 'meta_value_num',
@Trefex
Trefex / OVH_README.md
Last active January 23, 2020 20:11
How I setup my VPS on ovh-com

Config is 2vCPU, 2 GB RAM and running Debian 7 on 64 bits.

apt-get update
apt-get upgrade
apt-get install htop

Add localadmin user

adduser localadmin

apt-get install sudo

@patsweet
patsweet / mappy.js
Created July 15, 2013 16:19
Ties a datatable to a leaflet map. Requires jQuery, Leaflet, DataTables, Leaflet-geosearch
var intersections, // Geojson
map,
delaware, // Lat/Lng of center of Delaware
streetMapUrl,
streetMapLayer,
geosearch,
legend,
polyindex, // Custom ID for each point.
highlightStyle = {
fillColor: 'green',
@radiosilence
radiosilence / gist:3946121
Created October 24, 2012 13:43
Outputs some files that WMs can import and colourify everything with.
import sys
import colorsys
from colorz import colorz
WALLPAPER = '/home/james/.wallpaper'
COLORS = '/home/james/.colors'
XRESOURCES = '/home/james/.Xresources'
cols = ''
xres = """
@ns-1m
ns-1m / leaflet-button-control.js
Created June 15, 2012 09:07 — forked from ejh/leaflet-button-control.js
Leaflet control button example
// How to use it?
// OnAdd() is called when you use:
// var footButton = new L.Control.Button(footButtonOpts).addTo(map);
// It is passed the map object to which your control is being added.
// The third parameter passed to L.DomEvent.addListener is the context ('this' keyword) which
// you wish to have in the callback (second parameter).
// I still don't know how to use it.