Skip to content

Instantly share code, notes, and snippets.

View AramZS's full-sized avatar
🎯
Focusing

Aram Zucker-Scharff AramZS

🎯
Focusing
View GitHub Profile
@AramZS
AramZS / sample_console_script.js
Created April 17, 2014 19:19
Allow you to call a script file from inside of Chrome console
var script= document.createElement('script');
script.type= 'text/javascript';
script.src= 'http://someurl.com/somefile.js';
document.head.appendChild(script);
@AramZS
AramZS / co-authors-to-wp-seo.php
Created April 24, 2014 17:37
Get Co-Authors-Plus to talk with Yoast's WP-SEO
<?php
function wp_co_author_title($title){
if (is_author()){
$aTitle = get_the_author();
if (empty($aTitle)){
if (function_exists('get_coauthors')){
$qo = get_queried_object();
$bTitle = $qo->display_name;
return $bTitle . $title;
@AramZS
AramZS / fadeout.css
Created June 10, 2014 16:52
Faded out text
box:after {
content:"";
*zoom:1;
zoom:1;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=’#00e7e7e2’, endColorstr=’#e7e7e2’,GradientType=0 ); /* IE6-9 */
@AramZS
AramZS / network-related-objects.php
Created July 26, 2014 19:29
Some objects related to WP networks
@AramZS
AramZS / php_path_builder.php
Last active August 29, 2015 14:05
PHP Path Builder
<?php
/**
* Build file paths.
*
* Build paths with arrays Call out of static function class_name->build_path
* or self::build_path. Use like:
*
* build_path(array("home", "alice", "Documents", "example.txt"));
*
* @see http://php.net/manual/en/dir.constants.php
@AramZS
AramZS / Brightcove.html
Last active September 2, 2015 08:22
Brightcove
<!-- Start of Brightcove Player -->
<div style="display:none">
</div>
<div id="thePlayer">
<!--
By use of this code snippet, I agree to the Brightcove Publisher T and C
found at https://accounts.brightcove.com/en/terms-and-conditions/.
-->
@AramZS
AramZS / all-ll.html
Last active September 25, 2017 12:05
LazyLoad techniques
<!-- http://www.vox.com/2015/1/29/7947263/media-internet-poetry -->
<img
class="vox-lazy-load m-chorus-asset__in-entry-body"
src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
alt=" "
data-chorus-asset-id="3356728"
data-full-size="https://cdn2.vox-cdn.com/thumbor/JjbTvM14EYv6600xMXvyxzNw4BA=/cdn0.vox-cdn.com/uploads/chorus_asset/file/3356728/Vox.0.png"
data-original="https://cdn1.vox-cdn.com/uploads/chorus_asset/file/3356728/Vox.0.png" />
<noscript>
<img
@AramZS
AramZS / pf-ive-read.php
Created February 3, 2015 19:45
pf_ive_read
// Add Shortcode
function pf_total_wordcount_shortcode() {
$wc = 0;
$c = 0;
$the_query = new WP_Query(
array(
'nopaging' => true,
'date_query' => array(
'column' => 'post_date_gmt',
'after' => '30 days ago',
@AramZS
AramZS / bitly-response.php
Created February 3, 2015 22:35
What a Bit.ly-style redirect looks like as a wp_remote_get response.
<?php
# via var_dump(wp_remote_get('http://nzzl.me/1xqgPpn',array('redirection' => 0)));
array(5) {
["headers"]=>
array(9) {
["server"]=>
string(5) "nginx"
["date"]=>
@AramZS
AramZS / the-url-is-over-there.html
Last active August 29, 2015 14:14
Normal Canonical and OG:URL code
<link rel="canonical" href="http://jezebel.com/be-suspicious-of-the-new-harper-lee-novel-1683488258" />
<meta property="og:url" content="http://jezebel.com/be-suspicious-of-the-new-harper-lee-novel-1683488258" />