Skip to content

Instantly share code, notes, and snippets.

View AaronRutley's full-sized avatar

Aaron Rutley AaronRutley

  • Melbourne, Australia
View GitHub Profile
@AaronRutley
AaronRutley / wp query.php
Last active April 2, 2019 13:35 — forked from billerickson/gist:3698476
wp query
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
<ul class="share">
<li><a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" target="_blank"><i class="fa fa-facebook"></i></a></li>
<li><a href="https://twitter.com/intent/tweet?original_referer=<?php the_permalink(); ?>&text=<?php the_field('_yoast_wpseo_title'); ?>&tw_p=tweetbutton&url=<?php the_permalink(); ?>" target="_blank"><i class="fa fa-twitter"></i></a></li>
<li><a href="https://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&media=<?php echo $thumb[0]; ?>&description=<?php the_field('_yoast_wpseo_title'); ?>" target="_blank"><i class="fa fa-pinterest"></i></a></li>
<li><a href="https://plus.google.com/share?url=<?php the_permalink(); ?>" target="blank"><i class="fa fa-google-plus"></i></a></li>
</ul>
@AaronRutley
AaronRutley / gist:d556498c56736fa2db25
Last active August 29, 2015 14:15
git commit alias
# git commit alias
alias gc='function _gc(){
tput bold tput setaf 6
echo "-- git status..."
git status -s
echo "-- git add all modified..."
git add --all :/ ;
echo "-- git commit all modified, with commit message:"
read commit_message
git commit -am "$commit_message"
@AaronRutley
AaronRutley / gist:2ed7db1050a7a7308dc6
Last active August 29, 2015 14:15
Random Git Aliases
# git status
alias gs='function _gs(){
tput bold tput setaf 6
echo "-- git status"
git status -s;
};_gs'
#git push
alias gp ='git push'
@AaronRutley
AaronRutley / gist:b1f0555282ab437d6dda
Last active August 29, 2015 14:16
Social Share - Scss
// Placehoder selector for social share icon style
%social_share_icon_style {
width:20px;
line-height: 35px;
text-align:center;
font-size:em(20);
transition: color .5s;
margin-left:5px;
}
@AaronRutley
AaronRutley / gist:3185573557a40c454be0
Last active August 29, 2015 14:16
Social Share - HTML
<a href="<?php echo social_share_link("facebook"); ?>" class="facebook">Facebook</a>
<a href="<?php echo social_share_link("linkedin"); ?>" class="linkedin">LinkedIn</a>
<a href="<?php echo social_share_link("twitter"); ?>" class="twitter">Twitter</a>
@AaronRutley
AaronRutley / share-gist.php
Last active August 29, 2015 14:16
Social Share - PHP
<?php
function social_share_link($service) {
global $post;
$post_url = get_the_permalink($post->ID);
$post_url_encoded = urlencode($post_url);
$post_title = get_the_title($post->ID);
$twitter_username = 'aaronrutley';
if($service == "twitter") {
#start = run start.sh script
alias start='sh start.sh'
osascript -e '
set vagrantDir to "project-name-here"
set themeName to "theme-name-here"
tell app "iTerm"
activate
tell the first terminal
@AaronRutley
AaronRutley / gist:07c38c01130391e91bef
Last active May 6, 2018 18:49
Slick Responsive Photo Gallery with Sass
// width as a readable fraction
$whole : 100%;
$half : 50%;
$third : 33.3333%;
$quater : 25%;
$sixth : 16.6666%;
// gallery breakpoints
$gallery-breakpoint-small: em(0);
$gallery-breakpoint-medium: em(640);