<?php
// Initialize variables.
$db = JFactory::getDbo();
$subQuery = $db->getQuery(true);
$query = $db->getQuery(true);
// Create the base subQuery select statement.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remove_toolbar_items($wp_adminbar) { | |
$wp_adminbar->remove_node('wpseo-menu'); | |
} | |
add_action('admin_bar_menu', 'remove_toolbar_items', 999); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Mailchimp API v3 | |
* Add a subscriber to a list with interests on Google Form submit | |
* | |
* Updated to 3.0 from https://gist.github.com/acarrillo/5772508 | |
* | |
* Edit the Google Sheet connected to your form | |
* Menu > Tools > Script Editor | |
* Copy and paste this into the file, remove anything there already | |
* Update the variables in the top section |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
queryJobs() { | |
const jobQuery = gql` | |
query($city: String) { | |
jobs(city: $city){ | |
id | |
title | |
teaser | |
imageSmall | |
published | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Vue = require('vue'); | |
Vue.directive('delay-execute', { | |
acceptStatement: true, | |
bind: function () { | |
this._delayRunTimeout = parseInt(this.arg, 10) || 1000; | |
}, | |
update: function (handle) { | |
this.reset(); | |
this._delayRunTimer = setTimeout(handle, this._delayRunTimeout); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
# go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# node-reinstall | |
# credit: http://stackoverflow.com/a/11178106/2083544 | |
## program version | |
VERSION="0.0.13" | |
## path prefix | |
PREFIX="${PREFIX:-/usr/local}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Takes provided URL passed as argument and make full height screenshots of this page | |
* with several viewport widths using Nightwatch.js with Selenium. | |
* | |
* These viewport widths are taken from common android and iOS devices. Modify as needed. | |
* | |
* Takes an optional second argument for the path where screenshots are saved. | |
* | |
* Usage: | |
* $ nightwatch -t viewport-shots.js http://example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var str = 'This is a test string.'; | |
// Let's replace all spaces with ',' | |
str = str.split(' ').join(','); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Hover over an element on the page | |
*/ | |
(function() { | |
"use strict"; | |
var webdriver = require('selenium-webdriver'); | |
var driver = new webdriver.Builder().usingServer().withCapabilities({'browserName': 'chrome' }).build(); |
NewerOlder