Skip to content

Instantly share code, notes, and snippets.

@Shoora
Shoora / ga+jquery.html
Last active August 29, 2015 14:12 — forked from geraldcombs/ga+jquery.html
Google Analytic's async loader modified to be even more async using jQuery
<!--
Google Analytic's async loader modified to be even more async
using jQuery
http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html
-->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxx-x']);
_gaq.push(['_trackPageview']);
@Shoora
Shoora / Submit-Animation.markdown
Created January 29, 2014 04:12
A Pen by Jonatan Pettersson.
@Shoora
Shoora / Loading-Spinner.markdown
Created January 29, 2014 04:13
A Pen by JustAnotherCoder.

Resize Fonts with jQuery

Tinkering away with some more jQuery. Still pretty new to me but I am finding it very fun and challenging so far. If there is something that could be better please feel free to share. Thanks.

Updated pen to include a selected state for the different sizing options.

A Pen by Ian Farb on CodePen.

License.

@Shoora
Shoora / bookmarklet.js
Created May 17, 2016 00:56 — forked from fiatjaf/bookmarklet.js
the bookmarklet bookmarklet
function getJSON (url, callback) {
var xhr;
xhr = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
if (callback) {
callback(xhr.responseText);
}
}
};
@Shoora
Shoora / Remove SEO-plugin HTML comments.php
Created January 29, 2017 22:59 — forked from llgruff/Remove SEO-plugin HTML comments.php
Remove [All in One SEO Pack] or [Yoast SEO] HTML Comments in WordPress (for functions.php)
<?php
/**
* Remove [All in One SEO Pack] HTML Comments
* @link //gist.github.com/llgruff/a7ab776167aa0ed307ec445df54e5fdb
*/
if (defined('AIOSEOP_VERSION')) {
add_action('get_header', function() {
ob_start(
function($o) {
return preg_replace('/\n?<.*?One SEO Pack.*?>/mi','',$o);
@Shoora
Shoora / gist:978962a8746f1eb28a3d8d3b7d7aeea3
Created June 30, 2017 23:28 — forked from ChrisLTD/gist:9240291
Wordpress Tag Shortcode
<?php
/*
* Tag Shortcode
* Usage: [tag type="span" class="myClass" id="firstSpan"]Lorem ipsum dolor sit amet[/tag]
*/
function tag_shortcode( $atts, $content = null ) {
extract( shortcode_atts( array(
'class' => 'shortcode_class',
'id' => '',
'type' => 'div',
@Shoora
Shoora / events_counter.js
Created January 26, 2018 11:34 — forked from ershov-ilya/events_counter.js
Счётчик событий для метрики и GA
<script type='text/javascript'>
jQuery(document).ready(function() {
//СЕЛЕКТОРЫ
var sel = {
'add_to_basket': '.item-info-btn-holder, .buttonrequest, .products-item .button', //Добавление товара в корзину
'regist': '.register form, #office-auth-register', //регистрация
'auth': '#office-auth-login', //Авторизация
'subscribe': '.subscribe',// подписка на рассылку
'email': 'a[href^="mailto"]', //Клик по email
@Shoora
Shoora / GoogleSpreadsheet.html
Created January 26, 2018 11:40 — forked from terrywbrady/GoogleSpreadsheet.html
Sample HTML/JS to parse a Google Spreadsheet
<!doctype html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var spData = null;
function doData(json) {
spData = json.feed.entry;
}