Skip to content

Instantly share code, notes, and snippets.

View debrajrakshit's full-sized avatar
🎯
Focusing

Debraj Rakshit debrajrakshit

🎯
Focusing
View GitHub Profile
anonymous
anonymous / CSS-Gooey-Menu-(Version-2).markdown
Created March 2, 2015 04:31
CSS Gooey Menu (Version 2)
@JonMasterson
JonMasterson / alternate-function
Created November 5, 2013 17:40
Swap Font Awesome Icons based on the number of likes post receives. Can be used with my WordPress Like System.
<?php
/**
* Swap Function (5) with the following
* (5)(b) Front end button
*/
function getPostLikeLink( $post_id ) {
$theme_object = wp_get_theme();
$themename = esc_attr( $theme_object->Name ); // the theme name
$like_count = get_post_meta( $post_id, "_post_like_count", true ); // get post likes
if ( ( !$like_count ) || ( $like_count && $like_count == 0 ) ) { // no votes, set up empty variable
@kkirsche
kkirsche / Install Composer to use MAMP's PHP.md
Last active January 30, 2024 02:30
How to install Composer globally using MAMP's PHP

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line:

@wpscholar
wpscholar / jquery.external-links-new-window.js
Last active August 15, 2020 07:23
Open all external links in a new window