Skip to content

Instantly share code, notes, and snippets.

View gplessis's full-sized avatar

Guillaume Plessis gplessis

View GitHub Profile
@gplessis
gplessis / build_pecl_extensions.sh
Created September 21, 2014 20:32
Dotdeb : build PECL extensions
#!/bin/sh
export DEBFULLNAME="Guillaume Plessis"
export DEBEMAIL="[email protected]"
rm -r build-area pear *.tgz
debpear -c pecl -v -t igbinary-1.1.1.tgz -pv 1.1.1 -w http://pecl.php.net/get/igbinary-1.1.1.tgz igbinary
dpkg -i build-area/php5-igbinary_1.1.1-1~dotdeb.1_amd64.deb
debpear -c pecl -v -t msgpack-0.5.5.tgz -pv 0.5.5 -w http://pecl.php.net/get/msgpack-0.5.5.tgz msgpack
@gplessis
gplessis / auto_increment_capacity.sql
Created June 24, 2014 20:17
Detect AUTO_INCREMENT capacity in MySQL
SELECT table_schema,
table_name,
data_type,
( CASE data_type
WHEN 'tinyint' THEN 255
WHEN 'smallint' THEN 65535
WHEN 'mediumint' THEN 16777215
WHEN 'int' THEN 4294967295
WHEN 'bigint' THEN 18446744073709551615
end >> IF(Locate('unsigned', column_type) > 0, 0, 1) ) AS MAX_VALUE,