Skip to content

Instantly share code, notes, and snippets.

View joseluis's full-sized avatar
💭
dreamin' n workin'

José Luis Cruz joseluis

💭
dreamin' n workin'
View GitHub Profile
@joseluis
joseluis / gist:a1e602455c3f52d7ccced81cf8df68d0
Created October 20, 2016 19:37 — forked from amdrew/gist:9313218
Easy Digital Downloads - Show user's purchase history as dashboard widget
<?php
/**
* Register the dasboard widget
*/
function sumobi_edd_register_dashboard_widgets() {
wp_add_dashboard_widget( 'sumobi_edd_purchase_history', __( 'Purchase History', 'edd' ), 'sumbi_edd_purchase_history_widget' );
}
add_action( 'wp_dashboard_setup', 'sumobi_edd_register_dashboard_widgets' );
@joseluis
joseluis / libsass-install.bash
Created February 19, 2016 16:17 — forked from edouard-lopez/libsass-install.bash
Installing/Compiling libsass and sassc on Ubuntu 14.04+/Linux Mint 17+ (needed by node-sass)
# Based on https://github.com/sass/libsass/wiki/Building-with-autotools
# Install dependencies
apt-get install automake libtool
# Fetch sources
git clone https://github.com/sass/libsass.git
git clone https://github.com/sass/sassc.git libsass/sassc
# Create configure script
@joseluis
joseluis / nginx.conf
Created January 18, 2016 15:45 — forked from maryo/nginx.conf
Nginx dart configuration
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
@joseluis
joseluis / bash.generate.random.alphanumeric.string.sh
Created January 10, 2016 12:26 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@joseluis
joseluis / _typography.scss
Created November 8, 2015 12:20 — forked from mikedidthis/_typography.scss
A More Modern Scale for Web Typography - With REMS
// Modern Scale for Web Typography
// Ref: http://typecast.com/blog/a-more-modern-scale-for-web-typography
// -----------------------------------------------------------------------------
// Mobile
// -----------------------------------------------------------------------------
// Elem | Font | Line
// -----------------------------------------------------------------------------
// Body | 16px | 20px
// h1 | 32px | 40px
// h2 | 26px | 30px
// --------------------------------------------------------------------------------------
// A More Modern Scale for Web Typography
// Based on this article: http://typecast.com/blog/a-more-modern-scale-for-web-typography
// --------------------------------------------------------------------------------------
$body-font-size: 1em !default;
// Adjusts body typography to be default
// for each browser.
@mixin reset-body-font-size($font-size: 100%, $size-adjustment: 0.5) {
<wpcf-fields-select-option-australia>
<title>Australia</title>
<value>1</value>
</wpcf-fields-select-option-australia>
<wpcf-fields-select-option-canada>
<title>Canada</title>
<value>2</value>
</wpcf-fields-select-option-canada>
<wpcf-fields-select-option-france>
<title>France</title>
<?php
/**
* Debugging WordPress things.
*
* All of this belongs in your wp-config.php file.
*
* This will make sure that the code you release is, at a minimum,
* relatively free of PHP notices and warnings.
*
* - WP_DEBUG: This turns on debugging mode.
@joseluis
joseluis / style.scss
Last active August 29, 2015 14:01 — forked from luetkemj/style.css
/* =============================================================================
WordPress WYSIWYG Editor Styles
========================================================================== */
.entry-content img {
margin: 0 0 1.5em 0;
max-width: 100%;
height: auto;
}
.alignleft, img.alignleft {
<?php
add_action( 'admin_init', function() {
// remove the color scheme picker
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
// force all users to use the "Ectoplasm" color scheme
add_filter( 'get_user_option_admin_color', function() {
return 'ectoplasm';