CRUD = Create, Read, Update, Delete
$host = '127.0.0.1';
$dbname = 'test';
$username = 'root';| <?php | |
| /* | |
| Parameter Example | |
| $data = array('post_id'=>'12345','post_title'=>'A Blog post'); | |
| $target = 'single tocken id or topic name'; | |
| or | |
| $target = array('token1','token2','...'); // up to 1000 in one request | |
| */ | |
| public function sendMessage($data,$target){ | |
| //FCM api URL |
| * Downloaded or downloading | |
| ============================= | |
| **http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html | |
| **http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html | |
| **http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html | |
| **http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html | |
| **http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html | |
| *http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html | |
| *http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html |
| <?php | |
| class Mobile_Detect { | |
| protected $accept; | |
| protected $userAgent; | |
| protected $isMobile = false; | |
| protected $isAndroid = null; | |
| protected $isBlackberry = null; |
| <# | |
| .SYNOPSIS | |
| An MTR clone for PowerShell. | |
| Written by Tyler Applebaum. | |
| Version 2.0 | |
| .LINK | |
| https://gist.github.com/tylerapplebaum/dc527a3bd875f11871e2 | |
| http://www.team-cymru.org/IP-ASN-mapping.html#dns |
| #!/bin/bash | |
| # This script is used for create virtual hosts on CentOs. | |
| # Created by alexnogard from http://alexnogard.com | |
| # Improved by mattmezza from http://you.canmakethat.com | |
| # Feel free to modify it | |
| # PARAMETERS | |
| # | |
| # $usr - User | |
| # $dir - directory of web files | |
| # $servn - webserver address without www. |
| <?php | |
| /** | |
| * CLASS_NAME setup | |
| * | |
| * @since 1.0 | |
| */ | |
| class CLASS_NAME { | |
| private static $instance; |
| // Remove init rest routes | |
| remove_action( 'rest_api_init', 'create_initial_rest_routes', 0 ); | |
| // Remove oembed rest routes | |
| function remove_json_api () { | |
| // Remove the REST API lines from the HTML Header | |
| remove_action( 'wp_head', 'rest_output_link_wp_head', 10 ); | |
| remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 ); |
| <?php | |
| // this is to add a fake component to BuddyPress. A registered component is needed to add notifications | |
| function custom_filter_notifications_get_registered_components( $component_names = array() ) { | |
| // Force $component_names to be an array | |
| if ( ! is_array( $component_names ) ) { | |
| $component_names = array(); | |
| } | |
| // Add 'custom' component to registered components array |
| /** | |
| * Save the image on the server. | |
| */ | |
| function save_image( $base64_img, $title ) { | |
| // Upload dir. | |
| $upload_dir = wp_upload_dir(); | |
| $upload_path = str_replace( '/', DIRECTORY_SEPARATOR, $upload_dir['path'] ) . DIRECTORY_SEPARATOR; | |
| $img = str_replace( 'data:image/jpeg;base64,', '', $base64_img ); |