Skip to content

Instantly share code, notes, and snippets.

@vilav
vilav / wordpress-firebase.php
Created June 10, 2016 01:18 — forked from derekconjar/wordpress-firebase.php
An example of using Firebase and WordPress together. The idea is to use WP's custom post types and metaboxes to make content management easy, and sync with Firebase so that your websites have access to a real-time JSON feed of your custom data.
<?php
/**
* All custom functions should be defined in this class
* and tied to WP hooks/filters w/in the constructor method
*/
class Custom_Functions {
// Custom metaboxes and fields configuration
@vilav
vilav / _responsive-typography.scss
Created June 3, 2016 15:05
Responsive typography for Pavilion CSS Framework
/*
add to: scss/parts/*
include in: scss/pavilion.scss
run grunt (or compile in another way)
*/
@media(max-width: $phone-landscape-size - 1) {
.pp-h1 {
font-size: 3.157em;
@vilav
vilav / Google Docs Script
Created November 16, 2015 03:53 — forked from tomcritchlow/Google Docs Script
The Google Spreadsheets Script Used To Call Social Media APIs
function FBshares(url) {
var jsondata = UrlFetchApp.fetch("http://graph.facebook.com/"+url);
var object = Utilities.jsonParse(jsondata.getContentText());
return object.shares;
}
function Tweets(url) {
var jsondata = UrlFetchApp.fetch("http://urls.api.twitter.com/1/urls/count.json?url="+url);
var object = Utilities.jsonParse(jsondata.getContentText());
return object.count;