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
| /** | |
| * Simple localStorage with Cookie Fallback | |
| * v.1.0.0 | |
| * | |
| * USAGE: | |
| * ---------------------------------------- | |
| * Set New / Modify: | |
| * store('my_key', 'some_value'); | |
| * | |
| * Retrieve: |
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
| //descriptions from http://www.lunametrics.com/blog/2011/10/04/utmgif-request-parameters/ | |
| var utmwv = "5.3.8"; // Tracking code version | |
| var utms = "1"; // Session requests. Updates every time a __utm.gif request is made. Stops incrementing at 500 (max number of GIF requests per session). | |
| var utmn = "1797201820"; // Unique ID generated for each GIF request to prevent caching of the GIF image | |
| var utmhn = "teammentor-33-ci"; // Host name, which is a URL-encoded string | |
| var utmcs = "ISO-8859-1"; // Language encoding for the browser. Some browsers don’t set this, in which case it is set to “-” | |
| var utmsr = "1440x852"; // Screen resolution | |
| var utmvp = "1440x751"; // Size of Viewing Pane | |
| var utmsc = "32-bit"; // Screen color depth | |
| var utmul = "en-us"; // Browser language |
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: Feed Noticias Móviles | |
| Plugin URI: http://www.udd.cl | |
| Description: Crea un feed de noticias para consumo en aplicación móvil | |
| Version: 0.1 | |
| Author: Felipe Lavín (AyerViernes S.A.) | |
| Author URI: http://www.ayerviernes.com | |
| */ |
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 | |
| $elements = array(); | |
| //// | |
| // An array of 10,000 elements with random string values | |
| //// | |
| for($i = 0; $i < 10000; $i++) { | |
| $elements[] = (string)rand(10000000, 99999999); | |
| } |
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 | |
| /** | |
| * 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( |
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 oauth = ChromeExOAuth.initBackgroundPage({ | |
| 'request_url': 'http://www.tumblr.com/oauth/request_token', | |
| 'authorize_url': 'http://www.tumblr.com/oauth/authorize', | |
| 'access_url': 'http://www.tumblr.com/oauth/access_token', | |
| 'consumer_key': 'vGKikr2uBRsWoDZ947UjvSzA58HYEXDNjAer7VEXnLXlQt4Ozi', | |
| 'consumer_secret': 'JvofKKxQ2QSiVXVaWMBZQRzC5cI86YpJzAoouIkUdlvSeYXN2e', | |
| 'app_name': 'Photo post adder' | |
| }); | |
| function stringify(parameters) { |
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 | |
| // See: http://blog.ircmaxell.com/2013/02/preventing-csrf-attacks.html | |
| // Start a session (which should use cookies over HTTP only). | |
| session_start(); | |
| // Create a new CSRF token. | |
| if (! isset($_SESSION['csrf_token'])) { | |
| $_SESSION['csrf_token'] = base64_encode(openssl_random_pseudo_bytes(32)); | |
| } |
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
| #!/bin/bash | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
| # | |
| WP_OWNER=www-data # <-- wordpress owner | |
| WP_GROUP=www-data # <-- wordpress group | |
| WP_ROOT=$1 # <-- wordpress root directory |
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 | |
| $currentID = get_the_ID(); | |
| $featured = new WP_Query(array( | |
| 'post_type' => 'post', | |
| 'order' => 'DESC', | |
| 'posts_per_page' => 8, | |
| 'post__not_in' => array($currentID) | |
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 themename_customize_register($wp_customize){ | |
| $wp_customize->add_section('themename_color_scheme', array( | |
| 'title' => __('Color Scheme', 'themename'), | |
| 'priority' => 120, | |
| )); | |
| // ============================= |