Just found out this great site to find jQuery plugins. Worth to check it out.
Unheap was assembled in 2010 as an internal team resource. We found other repositories underwhelming and wanted to build a better experience for browsing & staying on top of the latest jQuery plugins. We made the site public on November 2012.
We’ve put a lot of effort into organizing, categorizing, thumbnailing and tagging plugins on our site and making sure things are as consistent as possible. There is plenty of room for improvement though, and we’d love your help to make things better. Send in feedback, suggestions or report bugs via the feedback form or by using Twitter, submit the freshest jQuery plugins and share the site if you find it useful.
Really cool project that allows one to visualize what other people have bought based on a search query.
This is particulary good to find book about a topic, for example lets say you’re trying to find some book about php performance as you can see it sugests heaps of interesting books based on hive-mind tastes.
I wanted to change mysql databases to use innodb_file_per_table problem is even if you add this to your my.cnf it will only affect newly created tables.
In order to alter existing ones I needed to run a bunch of alter tables with ENGINE=InnoDB. Because I have heaps of database and even more tables this was proving to be a huge time sink and my system was only using 1/16 of its resources since mysql only uses one thread per query.
To use multi thread power I needed to be able to run multiple queries at the same time but not too many otherwise I’ll hit the max amount of connection limit or max allowed number of forks.
Here’s the small script I wrote to overcome this problem:
# Read line in ~/tmp/convert_tables.txt
while read command; do
# Echo with command are we running (I love stdout)
# Run the command in backgroud
`bash -c "$command"`&
# This is the where magic happens,
# we don't want to have more than 10 jobs running
# so with a simple while counting the jobs running we
# can put the script "on hold" until other jobs finish
while [ `jobs | wc -l` -gt 10 ]; do
done < ~/tmp/convert_tables.txt
Inside convert_tables.txt I just have the commands I want to run, here a example set:
mysql -u root -e "alter table db1.keyvalue ENGINE=InnoDB;"
mysql -u root -e "alter table db2.acl_role ENGINE=InnoDB;"
mysql -u root -e "alter table db2.acl_role_has_privilege ENGINE=InnoDB;"
This ensures that if your date is in the end of the month strtotime will make calculation with the beginning of the month that way full calendar months will be added instead of number of days that current month has.
A jump table is an array of function pointers or even machine instructions, each of which actually performs the jump. The latter is commonly used in assembly language and can be produced by compilers, but the former is something you’re likely to write yourself, often to help simplify some code.