Skip to content

Instantly share code, notes, and snippets.

View AaronRutley's full-sized avatar

Aaron Rutley AaronRutley

  • Melbourne, Australia
View GitHub Profile
<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:b83a811188d988f33b38
Created March 18, 2015 15:51
Slick Responsive Photo Gallery with Sass - Example Sass
.gallery-7-up {
.image-1-of-7 {
@include gallery_grid($whole,$third,$third);
}
.image-2-of-7, .image-3-of-7 {
@include gallery_grid($half,$third,$third);
}
.image-4-of-7, .image-5-of-7, .image-6-of-7, .image-7-of-7 {
@include gallery_grid($half,$quater,$quater);
}
<div class="image-gallery-container gallery-7-up">
<div class="image image-1-of-7"><!-- image here --></div>
<div class="image image-2-of-7"><!-- image here --></div>
<div class="image image-3-of-7"><!-- image here --></div>
<div class="image image-4-of-7"><!-- image here --></div>
<div class="image image-5-of-7"><!-- image here --></div>
<div class="image image-6-of-7"><!-- image here --></div>
<div class="image image-7-of-7"><!-- image here --></div>
</div>