One-time Dependency Setup/Configuration
wget https://getcomposer.org/download/1.1.0/composer.phar && chmod +x composer.phar && sudo mv /usr/local/bin/composer && composer self-update
/// leastSquaresFit | |
/// Calculate the least square fit linear regression of provided values | |
/// @param {map} $map - A SASS map of viewport width and size value combinations | |
/// @return Linear equation as a calc() function | |
/// @example | |
/// font-size: leastSquaresFit((576: 24, 768: 24, 992: 34)); | |
/// @author Jake Wilson <[email protected]> | |
@function leastSquaresFit($map) { | |
// Get the number of provided breakpoints |
#! /bin/bash | |
# Usage: | |
# | |
# local-symlink.sh sitename -- add symlinks | |
# | |
# The value for sitename must match the folder you have for the site. | |
# | |
# Requires Local by Flywheel Volumes Add-on | |
# https://github.com/getflywheel/local-addon-volumes |
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
<?php | |
/** | |
* UNTESTED EXAMPLE! | |
* Please don’t use in production without having tested it before! | |
* @param integer $post_id Current post ID | |
* @return integer Current post ID | |
*/ | |
function example__cpt_clean_posts_cache( $post_id ) { | |
$post = get_post( $post_id ); |
function on_resize(namespace, callback, t) { | |
$(window).on('resize.' + namespace, function () { | |
clearTimeout(t); | |
t = setTimeout(callback, 100); | |
}); | |
return callback; | |
} |
/** | |
* @description Gravity Forms SASS overides inconjunction with Jay Hoffmann's add_bootstrap_container_class | |
* | |
* @author Jay Hoffmann (modified by Josh Cranwell) | |
* | |
* @source https://jayhoffmann.com/using-gravity-forms-bootstrap-styles/ | |
* | |
* @instructions | |
* - Gravity Form settings: HTML 5 [true], CSS OUTPUT [false]. | |
* - Repsonsive column classes must be added to each field in the admin to control inputs .col-[screen-size]-[column-count] |
#Laravel Valet HTTPS
Prior to Valet 1.1 you could user HAproxy After the introduction of Caddy server in Valet 1.1 you can add a simple file. (Recommend still generating a certificate to use for now).
Assuming we are using .dev domain.
#Valet 1.1+
Build a certificate (see next section)
2016-02-22 | |
During the Day (2016-01-22) i notice that Netflix is not working on my TV. I tried other Devices but always getting an Error pointing me to http://netflix.com/proxy. | |
I called netflix (Germany) and over 30 min the agent followed his script what need to be done (reboot the modem, change devices and use mobile data) to show me that netflix does not have a problem and i should call my ISP. | |
Short after that, i called my ISP. The Agent told me that this morning they got notified by the tech department that unitymedia tech is working with netflix tech on this issue. | |
If i use another connection - a VPN to my Server, mobile data - connection is possible. Netflix relax and say "look your ISP has an issue" | |
Detailed Information are written down as note to my Account. |
(function($) { | |
window.VcCustomElementView = vc.shortcode_view.extend( { | |
elementTemplate: false, | |
$wrapper: false, | |
changeShortcodeParams: function ( model ) { | |
var params; | |
window.VcCustomElementView.__super__.changeShortcodeParams.call( this, model ); | |
params = _.extend( {}, model.get( 'params' ) ); | |
if ( ! this.elementTemplate ) { |