I hereby claim:
- I am narayon on github.
- I am narayon (https://keybase.io/narayon) on keybase.
- I have a public key ASAInUGjO1eaI4pdabI7CM6B2AZpIWk-kPC3n-v3uuRHTQo
To claim this, I am signing this object:
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var bower = require('bower'); | |
var concat = require('gulp-concat'); | |
var sass = require('gulp-sass'); | |
var minifyCss = require('gulp-minify-css'); | |
var rename = require('gulp-rename'); | |
var sh = require('shelljs'); | |
var uglify = require('gulp-uglify'); | |
var mainBowerFiles = require('main-bower-files'); |
#!/bin/sh | |
# Change these settings to match what you are wanting to do | |
FILE=/File/To/Copy | |
PATH=/Where/To/Put/File | |
OPTIONS=`vagrant ssh-config | grep -v '^Host ' | awk -v ORS=' ' 'NF{print "-o " $1 "=" $2}'` | |
# copy from host to vagrant | |
# scp ${OPTIONS} $FILE v:$PATH |
<?php | |
function get_template_page_url( $template_name ) { | |
$url = null; | |
$pages = new \WP_Query( array( | |
'post_type' => 'page', | |
'meta_key' => '_wp_page_template', | |
'meta_value' => $template_name, | |
) ); |
I hereby claim:
To claim this, I am signing this object:
// Remove each style one by one | |
add_filter( 'woocommerce_enqueue_styles', 'jk_dequeue_styles' ); | |
function jk_dequeue_styles( $enqueue_styles ) { | |
unset( $enqueue_styles['woocommerce-general'] ); // Remove the gloss | |
unset( $enqueue_styles['woocommerce-layout'] ); // Remove the layout | |
unset( $enqueue_styles['woocommerce-smallscreen'] ); // Remove the smallscreen optimisation | |
return $enqueue_styles; | |
} | |
// Or just remove them all in one line |
<?php | |
// a.php: assuming this included everywhere at very first line | |
// and located in root directory | |
// preferable, define a constant instead of variable, cos it | |
// may used in functions directly without "global $ROOT"; | |
// to use for "include" | |
define('ROOT', __DIR__); // for PHP >= 5.3 | |
define('ROOT', realpath(dirname(__FILE__))); // for PHP < 5.3 | |
// to use for "src,href" |
function google_fonts() { | |
$query_args = array( | |
'family' => 'Open+Sans:400,700|Oswald:700' | |
'subset' => 'latin,latin-ext', | |
); | |
wp_register_style( 'google_fonts', add_query_arg( $query_args, "//fonts.googleapis.com/css" ), array(), null ); | |
} | |
add_action('wp_enqueue_scripts', 'google_fonts'); |
// MIT License | |
// @return {float} a random number between min and max | |
function getRandom(min, max) { | |
return Math.random() * (max - min) + min; | |
} | |
// @return {integer} a random int between min and max | |
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min + 1) + min); |
/*! | |
* $.preload() function for jQuery – http://mths.be/preload | |
* Preload images, CSS and JavaScript files without executing them | |
* Script by Stoyan Stefanov – http://www.phpied.com/preload-cssjavascript-without-execution/ | |
* Slightly rewritten by Mathias Bynens – http://mathiasbynens.be/ | |
* Note that since this script relies on jQuery, the preloading process will not start until jQuery has finished loading. | |
*/ | |
jQuery.preload = function(array) { | |
var length = array.length, |
javascript: (function() { | |
var root = angular.element(document.getElementsByTagName('html')); | |
var watchers = []; | |
var attributes = []; | |
var attributes_with_values = []; | |
var elements = []; | |
var elements_per_attr = []; | |
var scopes = []; |