Skip to content

Instantly share code, notes, and snippets.

View woganmay's full-sized avatar

Wogan May woganmay

View GitHub Profile
@woganmay
woganmay / squash.php
Created January 5, 2016 12:13
Use PHP to flatten a multidimensional stdClass object (like a json_decode result)
<?php
function squash($array, $prefix = '')
{
$flat = array();
$sep = ".";
if (!is_array($array)) $array = (array)$array;
foreach($array as $key => $value)
@woganmay
woganmay / query.sql
Last active September 17, 2015 16:19
/** MS SQL */
SELECT
t.NAME AS TableName,
p.[Rows] AS NumRows
FROM
sys.tables t
INNER JOIN
sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN
sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
00100010 01000001 01101000 00101100
00100000 01101101 01111001 00100000
01101100 01101001 01110100 01110100
01101100 01100101 00100000 01110111
01100001 01110010 01110010 01101001
01101111 01110010 00100001 00100000
01000001 01101110 01100100 00100000
01101000 01101111 01110111 00100000
01100001 01110010 01100101 00100000
01111001 01101111 01110101 00100000
global $wp_filter;
echo '<pre>';
print_r( $wp_filter['wp_title'] );
echo '</pre>';