This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # From https://kellenmace.com/set-up-ssl-locally-on-vvv-vagrant-wordpress-site/ | |
| cd ~/vagrant-local/config/nginx-config/sites | |
| mkdir ssl | |
| cd ssl | |
| # Generate ssl key and certificate | |
| openssl genrsa -out example.dev.key 2048 | |
| openssl req -new -x509 -key example.dev.key -out example.dev.cert -days 3650 -subj /CN=example.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var originalWidth = 2205; | |
| var originalHeight = 3500; | |
| var maxSize = 160; | |
| /** Thumbnails max width and height. */ | |
| var ratio = Math.min( maxSize / originalWidth, maxSize / originalHeight ); | |
| var thumbWidth = originalWidth * ratio; | |
| var thumbHeight = originalHeight * ratio; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function gcd( $a, $b ){ | |
| return ($a % $b) ? gcd($b,$a % $b) : $b; | |
| } | |
| function ratio( $x, $y ){ | |
| $gcd = gcd($x, $y); | |
| return ($x/$gcd).':'.($y/$gcd); | |
| } | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Disables the Insert Media button while the required fields are empty. | |
| */ | |
| (function(){ | |
| var SelectionEventBus = _.extend({ | |
| currentSelection: {}, | |
| invalidSelection: {}, | |
| }, Backbone.Events); | |
| var updateInvalid = function( collection ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ##### Theme #### | |
| Cobalt2 | |
| https://packagecontrol.io/packages/Theme%20-%20Cobalt2 | |
| ##### Packages ##### | |
| Package Controll: | |
| https://packagecontrol.io/installation | |
| Sublime Code Sniffer - phpcs and phpmd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Ejemplos WPValencia meetup | |
| * Plugin URI: http://wordpress.org/plugins | |
| * Description: Ejemplos para presentacion Introducción a los hooks. | |
| * Version: 0.0.1 | |
| * Author: Lucy Tomas | |
| * Author URI: http://lucytomas.com | |
| * License: GPLv2+ | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function my_add_action_links( $links ) { | |
| $links[] = '<a href="'. get_admin_url(null, 'options-general.php?page=plugin_name') .'">Settings</a>'; | |
| return $links; | |
| } | |
| add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'my_add_action_links' ); |
NewerOlder