Skip to content

Instantly share code, notes, and snippets.

View anytizer's full-sized avatar

Bimal Poudel anytizer

View GitHub Profile
MySQL: "Warning: MySQL server has gone away"
@anytizer
anytizer / MySQL Server has Gone Away
Created May 20, 2014 15:01
Due to a lack of resources available to MySQL
https://drupal.org/node/259580
@anytizer
anytizer / database-objects.txt
Created May 27, 2014 08:49
Prefixes and Suffixes on databse objects
Tables: No special prefixes, but short form of the group-names
Functions: f_
Views: v_
Stored Procedures: p_
Triggers: t_
Events: e_
Keys: append _key or _unique_key
@anytizer
anytizer / illegal-mix-character-sets.sql
Created June 10, 2014 14:24
Illegal mix of charactersets
-- Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '<>'
@anytizer
anytizer / unix time stamp.sql
Created June 11, 2014 07:53
unix time stamp
SELECT FROM_UNIXTIME(1402473055);
SELECT UNIX_TIMESTAMP('2014-06-11 11:50:55');
@anytizer
anytizer / projects.txt
Created June 11, 2014 08:15
List of projects under git/svn
apache-log4php-2.3.0
Behat
diagramo-all-in-one
dummy-data
facebook-php-sdk-master
generatedata
hybridauth-2.1.2
intellij-plugins
json-fast
logging-log4php
@anytizer
anytizer / times.sql
Created June 11, 2014 08:38
Limits of TIMESTAMP sizes.
CREATE TABLE `times` (
`t1` timestamp(1) NOT NULL DEFAULT CURRENT_TIMESTAMP(1) ON UPDATE CURRENT_TIMESTAMP(1),
`t2` timestamp(2) NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`t3` timestamp(3) NOT NULL DEFAULT '0000-00-00 00:00:00.000',
`t4` timestamp(4) NOT NULL DEFAULT '0000-00-00 00:00:00.0000',
`t5` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000',
`t6` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
);
SET NAMES BINARY;
SELECT LOWER('aA'), LOWER(CONVERT('aA' USING latin1));
SET NAMES UTF8;
SELECT LOWER('aA'), LOWER(CONVERT('aA' USING latin1));
@anytizer
anytizer / error_log.sh
Created June 12, 2014 08:31
Error Log recording from all sub-directories.
find /home/htdocs -type f -name 'error_log' > /tmp/error_log.log
@anytizer
anytizer / bmi.php
Created June 15, 2014 05:43
Body Mass Index calculator
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>BMI</title>
<style type="text/css">
*
{
font-size: 24px;
}