Skip to content

Instantly share code, notes, and snippets.

View Golgarud's full-sized avatar

Golga Golgarud

View GitHub Profile
@fugudesign
fugudesign / custom-gmap-shortcode.php
Last active May 18, 2018 14:42
Add a Wordpress shortcode to simply generate custom google maps without a plugin
<?php
/**
* Google Map Shortcode
* An optional separate file with custom styles can be loaded
* to declade the $gmapStyle variable contains the JSON as string
* change the path to match your config
*
* API KEY:
* You need to set your Google Maps API_KEY to the following constant
*
@fugudesign
fugudesign / gitploy.php
Last active May 29, 2018 17:36
PHP script to automatically deploy from github webhooks
<?php
/**
*
* AUTODEPLOY GITHUB REPO ON HOSTING
*
* @author Vincent Lalanne <info@fugu.fr>
*
*
* Step 1: create the SSH key on your hosting
* https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2
@zachleat
zachleat / gist:2008932
Created March 9, 2012 21:56
Prevent zoom on focus
// * iOS zooms on form element focus. This script prevents that behavior.
// * <meta name="viewport" content="width=device-width,initial-scale=1">
// If you dynamically add a maximum-scale where no default exists,
// the value persists on the page even after removed from viewport.content.
// So if no maximum-scale is set, adds maximum-scale=10 on blur.
// If maximum-scale is set, reuses that original value.
// * <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=2.0,maximum-scale=1.0">
// second maximum-scale declaration will take precedence.
// * Will respect original maximum-scale, if set.
// * Works with int or float scale values.
@unruthless
unruthless / CSS for <sup> and <sub>
Created May 26, 2010 01:31
CSS for <sub> and <sup>
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position