Skip to content

Instantly share code, notes, and snippets.

View d3zorg's full-sized avatar

Denis Safronenkov d3zorg

View GitHub Profile
@d3zorg
d3zorg / convert mysql engine.sql
Created January 31, 2013 19:25
Convert from MySQL MyISAM to InnoDB tables
SELECT CONCAT('ALTER TABLE ', table_name, ' ENGINE=InnoDB;') as ExecuteTheseSQLCommands
FROM information_schema.tables WHERE table_schema = 'name_of_your_db'
ORDER BY table_name DESC;
@d3zorg
d3zorg / matrix_terminal.sh
Created January 25, 2013 14:06
matrix style treminal
#!/bin/bash
# сhange the bs=value to speed up and increase the sizes of the bold and non-bold strings.
echo -ne "\e[32m" ; while true ; do echo -ne "\e[$(($RANDOM % 2 + 1))m" ; tr -c "[:print:]" " " < /dev/urandom | dd count=1 bs=50 2> /dev/null ; done
@d3zorg
d3zorg / mysql_profiler2.php
Created January 18, 2013 05:46
mysql profiler class
<?php
class mysql_profile
{
/**
* @var bool
*/
var $backtrace = false;
/**
* @var array
@d3zorg
d3zorg / memcache_keys.php
Last active December 11, 2015 04:58
var_dump memcache keys
<?php
$server = "localhost";
$port = 11211;
function sendMemcacheCommand($server,$port,$command){
$s = @fsockopen($server,$port);
if (!$s){
die("Cant connect to:".$server.':'.$port);