A Brief Introduction to Multi-Threading in PHP
- Foreword
- Execution
- Sharing
- Synchronization
- Pitfalls
| NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
| Download the following ZIPs: | |
| ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
| Download the correct GApps for your Android version: | |
| Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
| Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
| Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
| function onOpen(){ | |
| // example send for Sheets | |
| sendGAMP("UA-XXXX-1", SpreadsheetApp.getActiveSpreadsheet().getUrl()); | |
| // example send for Documents | |
| //sendGAMP("UA-XXXX-1", DocumentApp.getActiveDocument().getUrl()); | |
| // example send for Forms *NOTE* getUrl not implemented yet in New Sheets | |
| //sendGAMP("UA-XXXX-1", FormApp.getActiveForm().getUrl()); | |
| } |
| <?php | |
| file_get_contents_utf_ansi($filename, $defAnsiEnc = 'Windows-1251') | |
| { | |
| $buf = file_get_contents($filename); | |
| if (substr($buf, 0, 3) == "\xEF\xBB\xBF") return substr($buf,3); | |
| else if (substr($buf, 0, 2) == "\xFE\xFF") return mb_convert_encoding(substr($buf, 2), 'UTF-8', 'UTF-16BE'); | |
| else if (substr($buf, 0, 2) == "\xFF\xFE") return mb_convert_encoding(substr($buf, 2), 'UTF-8', 'UTF-16LE'); | |
| else if (substr($buf, 0, 4) == "\x00\x00\xFE\xFF") return mb_convert_encoding(substr($buf, 4), 'UTF-8', 'UTF-32BE'); |
| <?php | |
| /** | |
| * Plugin Name: Multiple Roles per User | |
| * Description: Allows anyone who can edit users to set multiple roles per user. In a default WordPress environment that wouldn't have much of an effect, since the user would have the privileges of the top-privileged role that you assign to him. But if you have custom roles with custom privileges, this might be helpful. | |
| * Version: 1 | |
| * Author: nikolov.tmw | |
| * Author URI: http://paiyakdev.com/ | |
| * License: GPL2 | |
| */ | |
| /* |
| <?php | |
| /** | |
| * Abstract class which has helper functions to get data from the database | |
| */ | |
| abstract class Base_Custom_Data | |
| { | |
| /** | |
| * The current table name | |
| * | |
| * @var boolean |
| <?php | |
| # Register custom post types on the 'init' hook. | |
| add_action( 'init', 'my_register_post_types' ); | |
| /** | |
| * Registers post types needed by the plugin. | |
| * | |
| * @since 1.0.0 | |
| * @access public |
| // Custom Dashboard widgets | |
| function custom_dashboard_widgets() { | |
| global $wp_meta_boxes; | |
| unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] ); | |
| unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] ); | |
| unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] ); | |
| unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] ); | |
| unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] ); | |
| unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] ); |
| ## | |
| ## This nginx.conf servers as the main config file for webflow reverse proxy | |
| ## | |
| ## RCS: | |
| ## https://gist.github.com/sansmischevia/5617402 | |
| ## | |
| ## Hardening tips: | |
| ## http://www.cyberciti.biz/tips/linux-unix-bsd-nginx-webserver-security.html | |
| ## |