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
| -- Error Message: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. | |
| -- | |
| -- our table name that has this issue is XYZ | |
| -- | |
| SET GLOBAL innodb_file_format=Barracuda; | |
| SET GLOBAL innodb_file_per_table=ON; | |
| ALTER TABLE XYZ ROW_FORMAT=COMPRESSED; |
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
| #!/usr/bin/env bash | |
| redColor="\033[0;31m" | |
| noColor="\033[0m" | |
| function exitCodeToText() { | |
| text="${redColor}NG${noColor}" | |
| if [[ "$1" == "0" ]]; then | |
| text="OK" | |
| fi |
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
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server ipv6only=on; | |
| root <Path to project folder>/public; | |
| index index.php index.html index.htm; | |
| server_name <Server name or IP address>; | |
| location / { |
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 | |
| class ResumeDownload { | |
| private $file; | |
| private $name; | |
| private $boundary; | |
| private $delay = 0; | |
| private $size = 0; | |
| function __construct($file, $delay = 0) { | |
| if (! is_file($file)) { |
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
| ======= Prolbem ================================================================================================================= | |
| I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute: | |
| rake db:create , command I get: | |
| PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) | |
| HINT: Use the same encoding as in the template database, or use template0 as template. | |
| : CREATE DATABASE "my_db_name" ENCODING = 'unicode'....... | |
| bin/rake:16:in `load' |
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
| require "csv" | |
| class Admin::ExportsController < Admin::BaseAdminController | |
| def index | |
| admin = Admin.first | |
| csv_string = CSV.generate do |csv| | |
| csv << Admin.attribute_names | |
| csv << admin.attributes.values | |
| end |
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
| server { | |
| listen 80; | |
| listen 443 ssl; | |
| server_name servername.domain; | |
| ssl on; | |
| ssl_certificate /etc/apache2/ssl/apache.crt; | |
| ssl_certificate_key /etc/apache2/ssl/apache.key; | |
| ssl_session_timeout 5m; | |
| ssl_protocols SSLv2 SSLv3 TLSv1; |
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
| <VirtualHost *:80 *:443> | |
| # Domain | |
| ServerName servername.domain | |
| SSLEngine On | |
| SSLProxyEngine On | |
| # Path to SSL CRT file | |
| SSLCertificateFile /etc/apache2/ssl/apache.crt | |
| # Path to SSL KEY file | |
| SSLCertificateKeyFile /etc/apache2/ssl/apache.key |
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 | |
| $phones = [ | |
| "0987654321", | |
| "0912345678", | |
| "01234567890", | |
| "01650930293", | |
| "0992938392", | |
| "01882938493", | |
| "0902938292", |
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 | |
| $date = "2016-01-01"; | |
| $outputFormat = "d/m/Y H:i:s"; | |
| $startTime = strtotime(date($date)); | |
| $endTime = strtotime(sprintf("%s 23:59:59", $date)); | |
| $dateTimes = []; | |
| while ($startTime < $endTime) { | |
| $startTime += 60; |