Skip to content

Instantly share code, notes, and snippets.

View whatnickcodes's full-sized avatar
😍

Nicholas Cerminara whatnickcodes

😍
View GitHub Profile
$justABunchOfParentDivs = $('.class-matching-500-elements-on-a-page');
$(window).resize(function() {
$justABunchOfParentDivs.each(function() {
$(this).attr('data-width', $(this).width());
});
});
@whatnickcodes
whatnickcodes / laila.html
Created September 14, 2015 14:34
How to do Columns in Bootstrap.
<div class="row">
<div class="col-md-6">
LEFT SIDE
</div>
<div class="col-md-6">
RIGHT SIDE
</div>
</div>
https://scotch.io/wp-content/uploads/2015/08/angular-etsy-stamplay-facebook-credentials.jpg
https://scotch.io/wp-content/uploads/2015/08/angular-etsy-stamplay-facebook-siteurl.jpg
https://scotch.io/wp-content/uploads/2015/08/angular-etsy-stamplay-facebook-scopes.jpg
https://scotch.io/wp-content/uploads/2015/08/angular-etsy-stamplay-facebook-redirect.jpg
https://scotch.io/wp-content/uploads/2015/08/angular-etsy-stamplay-facebook-login.jpg
https://scotch.io/wp-content/uploads/2015/08/angular-etsy-stamplay-facebook-logged-in.jpg
https://scotch.io/wp-content/uploads/2015/08/angular-etsy-stamplay-facebook-appid.jpg
https://scotch.io/wp-content/uploads/2015/08/angular-esty-stamplay-live-api1.png
https://scotch.io/wp-content/uploads/2015/08/angular-esty-stamplay-create-facebook-app.jpg
https://scotch.io/wp-content/uploads/2015/08/angular-esty-stamplay-live-api.png
<?php
/*
// Imploded from WordPress to free from DB
$loop = new WP_Query(array(
'posts_per_page' => -1,
'post_status' => 'inherit',
'post_type'=> 'attachment',
));
$array = array();
while($loop->have_posts()) : $loop->the_post();
@whatnickcodes
whatnickcodes / chrome-cache-recovery.js
Last active November 23, 2016 05:32
Quick and dirty script to recover images from chrome cache. Just paste this into your console to automatically download all Scotch.io cached images
// Open chrome://cache/ and paste the following script in the console. Feel free to edit the filter variable
var filter = /cask\.scotch\.io(.)*\.(jpg|jpeg|png|gif)/g;
/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);retu
config.vm.provision "shell", inline: <<-SHELL
## Only thing you probably really care about
DOMAINS=("site1" "site2" "site3")
## Loop through all sites
for ((i=0; i < ${#DOMAINS[@]}; i++)); do
## Current Domain
DOMAIN=${DOMAINS[$i]}
<!doctype html>
<!--[if lt IE 7 ]><html itemscope itemtype="http://schema.org/Product" id="ie6" class="ie ie-old" lang="en-US" prefix="og: http://ogp.me/ns#"><![endif]-->
<!--[if IE 7 ]> <html itemscope itemtype="http://schema.org/Product" id="ie7" class="ie ie-old" lang="en-US" prefix="og: http://ogp.me/ns#"><![endif]-->
<!--[if IE 8 ]> <html itemscope itemtype="http://schema.org/Product" id="ie8" class="ie ie-old" lang="en-US" prefix="og: http://ogp.me/ns#"><![endif]-->
<!--[if IE 9 ]> <html itemscope itemtype="http://schema.org/Product" id="ie9" class="ie" lang="en-US" prefix="og: http://ogp.me/ns#"><![endif]-->
<!--[if gt IE 9]><!--><html itemscope itemtype="http://schema.org/Product" lang="en-US" prefix="og: http://ogp.me/ns#"><!--<![endif]-->
<head>
<!-- Meta -->
<meta charset="utf-8">
<?php
// TO DO: ADD VALIDATION ON EMAIL AND ZIP BEFORE REQUEST
$email = $_POST['email'];
$zip = $_POST['zip'];
$url = 'https://api.myngp.com/v2/contacts/findOrCreate';
$post_data = array(
@whatnickcodes
whatnickcodes / example
Last active August 29, 2015 14:17
email-example.html
<form action="//empoweredwomen.us10.list-manage.com/subscribe/post?u=fb1fe75123478ceee1b8e3387&amp;id=59ea85d8ee" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
<div id="mc_embed_signup_scroll">
<div class="mc-field-group">
<label for="mce-EMAIL">Email Address <span class="asterisk">*</span>
</label>
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" required>
</div>
<div class="mc-field-group">
<label for="mce-FNAME">First Name </label>
<input type="text" value="" name="FNAME" class="" id="mce-FNAME">
<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/ePbKGoIGAXY"></iframe>
</div>
<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/ePbKGoIGAXY"></iframe>
</div>