Creating a new PHPExcel Object.
$this->PHPExcel = new PHPExcel();
Creating a new sheet:
| <?php | |
| function sanitize_phone( $phone, $international = false ) { | |
| $format = "/(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$/"; | |
| $alt_format = '/^(\+\s*)?((0{0,2}1{1,3}[^\d]+)?\(?\s*([2-9][0-9]{2})\s*[^\d]?\s*([2-9][0-9]{2})\s*[^\d]?\s*([\d]{4})){1}(\s*([[:alpha:]#][^\d]*\d.*))?$/'; | |
| // Trim & Clean extension | |
| $phone = trim( $phone ); | |
| $phone = preg_replace( '/\s+(#|x|ext(ension)?)\.?:?\s*(\d+)/', ' ext \3', $phone ); |
| /*! | |
| * @description Grunt@!!!!! | |
| */ | |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| uglify: { |
| ## Configure eth0 | |
| # | |
| # vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
| DEVICE="eth0" | |
| NM_CONTROLLED="yes" | |
| ONBOOT=yes | |
| HWADDR=A4:BA:DB:37:F1:04 | |
| TYPE=Ethernet | |
| BOOTPROTO=static |
| <?php | |
| function rotate($object, $object_uid, $property, $array, $field_index='uid', $return_field = "name") | |
| { | |
| global $db; | |
| $return_data = false; | |
| $rotating_array = array(); | |
| $next_value = false; | |
| $next_label = false; |
| -- http://stratosprovatopoulos.com/web-development/mysql/mysql-dynamically-convert-rows-to-columns/ | |
| SET group_concat_max_len=20000; | |
| SET @a = 0; | |
| SET @b = 0; | |
| set @num := 0; | |
| SET @regno := ''; | |
| SET @line1 = CONCAT ( |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| <?php | |
| $url = 'https://devicecheck.gsma.com/imeirtl/detailedblwithmodelinfo'; | |
| //INITIATE cURL | |
| $ch = curl_init($url); | |
| //CREATE PAYLOAD | |
| $payload = array( |
| <?php | |
| $imei = "354408064463695"; | |
| $apiKey = 'C31xxx950'; | |
| $password = 'paxxx#d'; | |
| $salt = 'Dxxx'; | |
| $orgID = 187; | |
| $secret = 'GSxxxion'; | |
| $signatureHash = hash("sh256", $apiKey . $password . $imei); |
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /Users/YOUR_USERNAME/Sites; | |
| access_log /Library/Logs/default.access.log main; | |
| location / { | |
| include /usr/local/etc/nginx/conf.d/php-fpm; | |
| } |