Skip to content

Instantly share code, notes, and snippets.

@fovoc
fovoc / usbstartup.sh
Created April 23, 2016 12:02 — forked from hanbzu/usbstartup.sh
Linux/Ubuntu: USB startup disk through the command line
# The Ubuntu USB startup creator often crashes.
# This is an alternate way of doing the same process through the command line
# First plug in the USB pendrive. It will mount automatically
# Then check where it is (which device)
df
# Let's say we see it's in /dev/sdb1
# Then we have to use /dev/sdb and NOT /dev/sdb1
@fovoc
fovoc / gist:7979ab39ec49744be2d176dca885c038
Created April 8, 2016 12:03 — forked from higiacomo/gist:e4c484a1a271c8eb33a2
List last 100 registered WordPress / BuddyPress users without a gravatar or uploaded avatar
/**
*
* List last 100 registered users without a gravatar or uploaded avatar
*
*/
add_action( 'admin_menu', 'wk_list_members_without_profile_picture' );
function wk_list_members_without_profile_picture(){
add_menu_page( 'Members w/o picture', 'Members w/o picture', 'manage_options', 'wb-without-avatar', 'wb_without_avatar' );
}
@fovoc
fovoc / gist:fac851abc0188062215f
Created February 26, 2016 09:39 — forked from billerickson/gist:3698476
WP: Query $args
<?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(
@fovoc
fovoc / functions.php
Last active October 20, 2015 12:43 — forked from strangerstudios/gist:3111478
Lockdown BuddyPress with Paid Memberships Pro Example
<?php
/*
Plugin Name: PMPro BuddyPress Customizations
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-buddypress-customizations/
Description: Example code to lock down parts of BuddyPress with PMPro
Version: 0.2
Author: Stranger Studios
Author URI: http://www.strangerstudios.com
*/
/*
@fovoc
fovoc / events-conditional-wrappers.php
Created October 13, 2015 08:44 — forked from jo-snips/events-conditional-wrappers.php
The Events Calendar: Basic Conditional Wrappers
<?php
/*-----------------------------------------------------------------------------------*/
/* Conditional Logic to Detect Various Event Related Views/Pages
/*-----------------------------------------------------------------------------------*/
if( tribe_is_month() && !is_tax() ) { // Month View Page
echo 'were on the month view page';
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page
// setup one language for admin and the other for theme
// must be called before load_theme_textdomain()
function set_my_locale($locale) {
$locale = ( is_admin() ) ? "en_US" : "it_IT";
setlocale(LC_ALL, $local );
return $locale;
}
add_filter( 'locale', 'set_my_locale' );

Star Wars: The Force Awakens in CSS

CSS animated title from the recent trailer. So excited!

Learn how to create this and much more with my email course:

https://cssanimation.rocks/courses/animation-101/

<3 Use code "codepen" to save 20% off the usual course price <3

Marvel Logo animation | pure CSS

watching the new daredevil series on netflix led me to doing this ;)

webkit only (requires -webkit-background-clip)

A Pen by Gregor Adams on CodePen.

License.

if ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' ) {
// Windows
$content_dir = str_replace( '/', DIRECTORY_SEPARATOR, WP_CONTENT_DIR );
$content_url = str_replace( $content_dir, WP_CONTENT_URL, dirname(__FILE__) );
$content_url = str_replace( $content_dir, content_url(), dirname(__FILE__) );
$cmb_url = str_replace( DIRECTORY_SEPARATOR, '/', $content_url );
} else {
$cmb_url = str_replace(
array(WP_CONTENT_DIR, WP_PLUGIN_DIR),