Skip to content

Instantly share code, notes, and snippets.

@AllThingsSmitty
AllThingsSmitty / css-not.scss
Last active November 28, 2018 16:16
Use CSS :not() instead of applying and unapplying borders on navigations
.nav-tab {
...
// instead of putting it on
border-right: 1px solid #424242;
&:last-child {
border-right: 0; // and then taking it off
}
// use CSS not() to only apply to the elements you want
&:not(:last-child) {
border-right: 1px solid #424242;
@sniperwolf
sniperwolf / MySQL_basic_and_simple_cheatsheet.md
Last active September 6, 2022 04:02
MySQL Basic and Simple Cheatsheet
@adelevie
adelevie / account-controller.js
Last active December 2, 2017 13:11
Parse.com + Angular.js + Login (+ OAuth.js)
'use strict';
/**
* AccountController allows the User to change settings, link with their GitHub accounts, etc
*/
skeletonApp.controller('AccountController', [
'$scope', '$location', '$rootScope', 'OAuthService', 'ParseService', function($scope, $location, $rootScope, OAuthService, ParseService) {
// redirect to "/login" if user is not logged in
@sniperwolf
sniperwolf / ajax.php
Last active December 29, 2022 12:25
Super-Simple WordPress ajax post-popup with jQuery and Reveal plugin
<?php
/**
* Template Name: ajax
*/
?>
<?php
$post = get_post($_GET['id']);
?>
<?php if ($post) : ?>
<?php setup_postdata($post); ?>
@WebEndevSnippets
WebEndevSnippets / style.css
Last active April 18, 2018 12:08
Gravity Forms: 4 Column CSS
/* 4 column Gravity Forms custom ready class ------------------------------------------------------*/
.gform_wrapper .top_label li.gfield.gf_first_quarter,
.gform_wrapper .top_label li.gfield.gf_second_quarter,
.gform_wrapper .top_label li.gfield.gf_third_quarter,
.gform_wrapper .top_label li.gfield.gf_fourth_quarter {
margin:0 0 8px 0;
width:24%;
}
@mikejolley
mikejolley / functions.php
Last active April 23, 2018 13:31
WooCommerce - Custom tracking code
add_action( 'woocommerce_thankyou', 'my_custom_tracking' );
function my_custom_tracking( $order_id ) {
// Lets grab the order
$order = wc_get_order( $order_id );
/**
* Put your tracking code here
* You can get the order total etc e.g. $order->get_total();