- Updated 20 August 2016
- SSH into the Pressmatic box
$ apt-get update$ apt-get install curl php5-cli git subversion$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
| /* Quick and dirty, should be wrapped better but this is just a demo */ | |
| var app = app || {}; | |
| app.apikeys = app.apikeys || {}; | |
| app.urls = app.urls || {}; | |
| app.methods = app.methods || {}; | |
| app.apikeys.zillow = 'YOUR API KEY HERE'; | |
| app.urls.zillow = { |
| """ | |
| quick script put together to scrape zillow listing data | |
| at the very least it functions so you don't need to go back and forth to calculate commute times | |
| very messy... maybe i'll revisit this someday | |
| """ | |
| import requests | |
| import re | |
| import csv |
| # This file follows the WordPress CSS standards as closely as possible. For any | |
| # linters that aren't listed in this file, we're accepting the default settings. | |
| # https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/ | |
| # Linter documentation: http://git.io/vG7gu | |
| # See also: http://sass-guidelin.es/ | |
| linters: | |
| Comment: |
| <?php | |
| /** | |
| * Count number of widgets in a sidebar | |
| * Used to add classes to widget areas so widgets can be displayed one, two, three or four per row | |
| */ | |
| function slbd_count_widgets( $sidebar_id ) { | |
| // If loading from front page, consult $_wp_sidebars_widgets rather than options | |
| // to see if wp_convert_widget_settings() has made manipulations in memory. | |
| global $_wp_sidebars_widgets; |
| // add this javascript to your Zendesk Help Center pages | |
| (function($) { | |
| $(function() { | |
| // for all attachment links whose URLs end with .pdf (case sensitive)... | |
| var pdfs = $('.attachments a[href$=".pdf"]'); | |
| var eleBody = $('div.article-body'); | |
| if (pdfs.length > 0) { |
| //re-direct end users to My Activities | |
| if(HelpCenter.user.role=="end_user"){ | |
| location.href="https://yoursubdomain.zendesk.com/hc/en-us/requests/";} |
| <?php | |
| /** | |
| * Adds IDX sitemap URLs to Yoast's sitemap_index.xml | |
| * Get your individual sitemap URLs by viewing the source of your primary sitemap URL. | |
| * To manually refresh your sitemaps, deactivate sitemaps and reactivate. | |
| * From: https://kb.yoast.com/kb/add-external-sitemap-to-index/ | |
| */ | |
| add_filter( 'wpseo_sitemap_index', 'add_idx_sitemap' ); | |
| function add_idx_sitemap() { | |
| $idx_sitemap = ' |
| <?php | |
| /** | |
| * Heavily borrowed from: http://xplus3.net/2010/08/08/filtering-on-a-non-standard-database-field-with-wordpress/ | |
| **/ | |
| class CoordinatesTable extends DB { | |
| protected $db_option = "coordinates_db"; |
| function wp_update_privacy( $query ) { | |
| unset($query['php']); | |
| unset($query['mysql']); | |
| unset($query['local_package']); | |
| unset($query['blogs']); | |
| unset($query['users']); | |
| unset($query['multisite_enabled']); | |
| unset($query['initial_db_version']); | |
| return $query; | |
| } |