Skip to content

Instantly share code, notes, and snippets.

View tareiking's full-sized avatar
🥰
Inventing the future with friends

Tarei King tareiking

🥰
Inventing the future with friends
View GitHub Profile
@tareiking
tareiking / functions.php
Last active August 29, 2015 13:57
Create a product category array from a single product in WooCommerce
<?php
/* Remove Add to Cart button from product loop
* Removes all pricing and add to cart buttons from the product loop
* Mad props to http://profiles.wordpress.org/daledude/
* For his answer deep here: http://profiles.wordpress.org/daledude/
*/
function abbey_remove_woocommerce(){
@tareiking
tareiking / example.css
Last active August 29, 2015 13:57
Styling a data-attribute
// Never really thought about this until I saw it
[data-type="profile"] .counts .h4 small {
display: block;
clear: both;
font-size: 12px;
color: #4f405f;
opacity: 1;
}
@tareiking
tareiking / _settings.scss
Created March 18, 2014 04:42
Foundation 5.2 Breakpoints
// Here we define the lower and upper bounds for each media size
$small-range: (0em, 40em); /* 0, 640px */
$medium-range: (40.063em, 64em); /* 641px, 1024px */
$large-range: (64.063em, 90em); /* 1025px, 1440px */
$xlarge-range: (90.063em, 120em); /* 1441px, 1920px */
$xxlarge-range: (120.063em); /* 1921px */
@tareiking
tareiking / comments.php
Last active August 29, 2015 13:58
Removes the default wordpress "Allowed codes" from below comment sections.
<?php
// Remove "code" section after comments and replace with NOTHING!!!
comment_form( array( 'comment_notes_after' => '' ) );
$("form :input").each(function(index, elem) {
var eId = $(elem).attr("id");
var label = null;
if (eId && (label = $(elem).parents("form").find("label[for="+eId+"]")).length == 1) {
$(elem).attr("placeholder", $(label).html());
$(label).remove();
}
});
@tareiking
tareiking / maps.scss
Created April 29, 2014 12:54
SASS Maps
// The idea here is that you can define all your variables into a single $properties value and refer to them
// throughout the SASS project files.
// Potential usecase: Defining common values and Foundation 5 overrides
$properties: (
background: red,
color: blue,
font-size: 1em,
font-family: (Helvetica, arial, sans-serif)
);
@tareiking
tareiking / na.md
Created May 1, 2014 00:49
Methods of checking dependent classes / plugins have loaded
@tareiking
tareiking / _typography.scss
Created May 12, 2014 10:20
http://stackoverflow.com/questions/2689265/can-git-undo-a-checkout-of-unstaged-filesGive LI item's font awesome icons instead .. and maintain padding values. Source
/* ================================================================================
#Lists
================================================================================ */
.content,
.sidebar {
ul, ol {
margin-left: 0;
list-style: none;
display: table;
@tareiking
tareiking / gist:08b377c367ed336d0362
Created May 13, 2014 08:39
List of FontAwesome icon names
fa-glass
fa-music
fa-search
fa-envelope-o
fa-heart
fa-star
fa-star-o
fa-user
fa-film
fa-th-large
@tareiking
tareiking / nokogiri.sh
Last active August 29, 2015 14:01
Install nokogiri on mac os mavericks
## Need to have xcode installed
sudo xcode-select -s /Library/Developer/CommandLineTools/
sudo gem install nokogiri -- --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2