It has been a long time since I finished marketnodes.com project. That was good experience of working with graphs and javascript visualization tools. A year later this knowledge helped me a lot during my work. This I’ve decided to create a short list of useful graph visualization libraries.
Of course, this table is not full, but I will try to add some more information about these libraries later as well as new libraries.
if(window.location.hash) { loadPage(window.location.hash); }
$(window).bind('hashchange', function () { loadPage(window.location.hash); });
function loadPage(hash) {
hash = hash.replace('#','');
$.post('ajax.php', {'hash': hash}, function(data){
$('#content').html(data);
});
}
Today I’ve shared my small investigation on how to differentiate mobile devices in CSS by @media tag.
For now it covers only iOS devices as they are easier to identify (Android and WP devices have mush more variety of screen sizes/resolutions), but it can be easily adjusted. The code is tested on all the iOS devices except iPhone 5 as I have no access to it for now.
For tests use this link
This script should be executed in developer console.
When your VK group type is “closed” and you receive lots of membership requests it is pain to accept/decline users. To avoid this you probably want to automate at least some part of user-filtering.
Here is a script for declining all blocked/deleted users automatically. First of all go to you membership requests page and scroll it until page will stop loading users.
Step 1: add jQuery library to the page.
function loadScript(url, callback)
{
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
head.appendChild(script);
}
loadScript("http://yandex.st/jquery/1.8.1/jquery.min.js");
Step 2: execute decline actions
jQuery.noConflict(); // otherwise jQuery conflicts with VK's build-in Prototype library.
while(jQuery("#requests_show_more_link").length > 0) {
jQuery(".group_p_row").each(function(index){
if(jQuery(this).find(".group_p_photo_img").attr("src") == "/images/deactivated_c.gif") {
console.log(jQuery(this).find(".group_p_name").find("a").text()); // this line can be removed
command = jQuery(this).find("small").find("span").last().find("a").attr("onclick");
eval(command);
}
});
}
Done.
$this->createTable('{{rel_projects_users}}', array(
(...)
), 'ENGINE InnoDB');
After yet another regular update of my Ubuntu system I recognised that it reset all the shortcuts to “Disabled”. To return their values to default I’ve used this script:
cd /usr/share/gnome-control-center/keybindings
for entry in $(grep KeyListEntry * |cut -d'/' -f2- |cut -d'"' -f1); do
echo $entry
gconftool -u "/$entry"
done
Source
After MAMP installation
1.
echo "export PATH=/Applications/MAMP/bin/php/php5.4.4/bin:$PATH" >> ~/.profile
Where 5.4.4 – you php version.
2.
which php
Test if everything ok.
3.
source .profile
4.
pear channel-discover pear.phpunit.de
Adding phpUnit repository.
5.
pear channel-discover pear.symfony-project.com
Adding required yaml repository
6.
pear install --alldeps phpunit/PHPUnit
Install phpUnit
7.
pear install phpunit/PHPUnit_Selenium
Install phpUnit-Selenium additional module
I have just published my implementation of ORM library for Codeigniter framework. I used to use Doctrine in my Codeigniter projects. However, heavy Doctrine library is unreasonable choice for small and mid-size projects, where you need only simple migrations and automatic model generation for fast and easy development and deployment.
Initially, I was looking for some solution on that field, but unfortunately I found nothing similar with what I wanted to use. So, I’ve started with my own implementation of the simple idea of ORM system for Codeigniter.
After 3 months of very slow development in spare time I pushed the first version of the Justorm ORM for Codeigniter to the github repository.
Hope it will be useful for someone else also.
git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit