James Bachini

linux

  • High CPU usage on mysqld but low memory usage

    Had a problem with a server that was running alot of traffic and doing a lot of logging and updating mysql tables. The CPU usage was through the roof and it’s an 8 core server with 30GB of RAM. The strange thing was that mysqld was using all the processing power but hardly any memory…

  • Merry Xmas from jamesbachini.com

  • First Steps in Automation

    First Steps in Automation

    One of the great things about this industry is the lifestyle flexibility it offers you. The dream is to setup a campaign or website, let it run itself and live off the money tree you’ve made. In reality it rarely works like this but automation can release hours off your daily routines and go some…

  • Bing URL Ripper for Dorks

    This is a URL ripper which uses bing to search for a dork i.e. “powered by wordpress” and output a list of thousands of wordpress sites. This example was actually setup to rip ning sites but you can adjust accordingly. Written in ruby for linux… #!/usr/bin/env ruby require ‘net/http’ require ‘uri’ class Search def search(search)…

  • Ruby & Selenium Script to Check Google SERP ranks

    Haven’t used this in a while but it used to work really well untill google would throw a captcha at you after the first 5000 queries. Might be of use to someone. It’s designed for linux and you’ll need selenium up and running to work it. #!/usr/bin/env ruby require ‘rubygems’ gem ‘selenium-client’ require ‘selenium/client’ system(‘java…

  • Three ways to debug php

    Method 1 – error.log For this to work you need to be coding in a linux environment with php, apache etc setup. This is the best way I have found and what I currently use to debug my applications/web pages. open up a new terminal and type: tail -f /var/log/apache2/error.log This will give you a…