Skip to content

Instantly share code, notes, and snippets.

View erickarbe's full-sized avatar

Erick Arbé erickarbe

View GitHub Profile
@erickarbe
erickarbe / gist:2713607
Created May 16, 2012 20:17
Simple jQuery Dropdown Script
$(function(){
$("ul.dropdown li").hover(function(){
$(this).addClass("hover");
$('ul:first',this).css('visibility', 'visible');
}, function(){
$(this).removeClass("hover");
@erickarbe
erickarbe / gist:2698356
Created May 15, 2012 01:04
Get Instagram Pics by tag via PHP
<?php
$client_id = "xxx"; //your client-id here
$tag = "kittens"; //your tag here
$cachefile = "instagram_cache/$tag.cache";
if (file_exists($cachefile) && time()-filemtime($cachefile)<3600) {
$contents = file_get_contents($cachefile);
} else {
@erickarbe
erickarbe / WP Snippets
Last active October 4, 2015 14:28
WordPress Snippets for functions.php
/**
*
* HIDE THE WORDPRESS UPDATE NOTIFICATION (FOR ALL USERS EXCEPT SYSADMIN)
*
**/
global $user_login;
get_currentuserinfo();
if (!current_user_can('update_plugins')) { // checks to see if current user can update plugins