Mysql Error: too many open files

# error: ERROR 1018 (HY000): Can’t read dir of ‘.’ (errno: 24)

# Super user
$ sudo su

# See what mysql files are open
$ lsof -u mysql

# Count how many mysql files are open
$ lsof -u mysql | wc -l

# close mysql files
$ kill -9 `lsof -t -u mysql`

# sources

Fixing ethernet network connection

Issue: When plugin in the Ethernet cable to computer would be not have a connection.
Reason: Ethernet driver is not installed, corrupted or out of date.
motherboard: Asus z97-AR
Intel CPU: Intel Core i7-4790K
operating system: Window 7

Go to device manager.
Under ‘Other devices’ the Ethernet Controller has a warning icon

donwload then extract ‘Turbo LAN V1.04.01 for Windows 7/8/8.1 32bit & 64bit.’ driver from asus site

In device manager right click on ‘Ethernet Controller’ then ‘Update Driver Software’ then ‘browse my computer for driver software’
Browse to the extracted folder ‘Intel_LAN_Win7-8-8-1_VER191510’ then click next

Restart computer

Raspberry Pi troubleshooting

Error: ‘No space left on device’
# check memory size.

$ df -h

# None should have 100% but if so here is how to fix it

$ sudo raspi-config

# select ‘Expand Filesystem’ then restart computer when prompted

Changing keyboard layout

$ sudo raspi-config

# select Internatinalisation Options->Change Keyboard Layout->Generic 105-key (Intl) PC->Other->English (US)->English (US)->Right Alt (AltGr)->No compose key->…
# alternative

Fix Raspberry pi zero wifi disconnect/sleeps after a certain period of time. source, and here

$ sudo nano /etc/modprobe.d/8192cu.conf

Add these lines
# Disable power management
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

After a while the monitor will wont work and you will not be able to see the command line once you plug in the HDMI. It goes black and you cannot see the screen. In order to keep the terminal alive here what is need to be done. source, source2

$ sudo nano /etc/rc.local

ABOVE the “exit 0” line insert:
setterm -blank 0 -powerdown 0 -powersave off

$ sudo reboot

# As of 2016-07-03 you cannot update raspberry pi packages thus some programs cannot be updated such as git.
# to have the latest git version you will need to install it by source
How To Install Git from Source

PuPHPet troubleshooting

You may avoid issues by using the MINGW32 terminal instead of something else.


Installed a new puphpet and the web page won’t show up.

  1. vagrant ssh
    • inside the puphpet folder
  2. $ telnet locahost 80
    • verify a successful response
  3. $ sudo service apache2 restart
    • if apache2: Configuration error: More than one MPM loaded.
      1. $ sudo a2dismod worker
      2. $ sudo service apache2 restart

If php file is being read as plain text.  This was a phpmyadmin issue

  1. run $ sudo apt-get install libapache2-mod-php5
  2.  restart apache

You may get an phpmyadmin error ‘phpmyadmin.pma_table_uiprefs doesn’t exist’ when you attempt to open database tables
run this command
$ sudo dpkg-reconfigure phpmyadmin

Vagrant: Fix VT-x/AMD-V hardware acceleration

Operating System: Windows 7
Motherboard: asus z-97-ar
Intel CPU: Intel Core i7-4790K

Does your CPU support virtualization?

Download software

You must enable Virtualization in BIOS
Advvance -> CPU Configurations -> Intel Virtualization Technology -> enable

The reasons I had to enable VT-x was because when I “vagrant up” I received these error

1. In the command like it got stuck on “default: Warning: Connection timeout. Retrying…”

2. in Oracle Virtualbox:
“VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.”

So to resolve that I need to enable VT-x and in my Vagrant file add

config.vm.provider :virtualbox do |vb|
  vb.customize ["modifyvm", :id, "--hwvirtex", "on"]


homestead laravel

SSH Private Key conversion

In attempt to login into a ssh server using a private key in phpstorm I ran accross this error.

Keypair ‘private_key.ppk’ is corrupt or has unknown format. Only SSH2 keys in OpenSSH format or PuTTY Private Key *.ppk are supported. Error message: The cipher ‘aes256-cbc’ is required, but it is not available.

This error will not allow the “next” and “test connection” button to appear

The issue here is that the private key format is incorrect. You’ll will need to convert the private key to open ssh format. And the way to do that is

Open your private key in PuTTYGen
Top menu “Conversions”->”Export OpenSSH key”.
Save the new OpenSSH key when prompted.

Ubuntu Adding Packages

When attempting to install a program thru apt-get the most frustrating moment is when the program cannot be found and what’s worst is not being able to add the package to install the program. In the past attempting to add packages by editing /etc/apt/sources.list has been unsuccessful but success has came from adding thru “apt-add-repository” command line command. Here are examples.

Where to find packages
ppa packages info

To install cmake:
$ sudo apt-add-repository ppa:kalakris/cmake
$ sudo apt-get update
$ sudo apt-get install cmake

To install emacsen-common:
$ sudo add-apt-repository ppa:kubuntu-ppa/backports
$ sudo apt-get update
$ sudo apt-get install emacsen-common

To install cheese
# adding a line to your /etc/apt/sources.list like this:
deb precise main universe
$ nano /etc/apt/sources.list
$ sudo apt-get update
$ sudo apt-get install cheese

View package info

$ apt-cache policy [package name]
# apt-cache policy cheese

Wireless Connecting but not Internet

Today I used wireless internet at a doctors office. When I arrived back home home my Dell Latitude computer could not connect to the internet wirelessly (could connect thru a ethernet cord). It showed as connected to my router but not the internet. There were no issues with the router and the internet because my iphone could surf the internet. It seems that when I connected to the internet at the clinic it messed up my PC. Here how I fixed it.

Right clicked on the “monitor in front of monitor” icon at the bottom right corner and selected “connect to network”.

Right clicked on the internet that I was trying to connect to and selected “diagnose”.

A new window opened and I clicked on an option that said something about “resetting the the ip address” (not exactly sure) and it showed a loading screen saying “repairing”. And that fixed it

wireless connecting but no internet

Virtual Box Internet Issue

The problem:
unable to connect to internet
$ ping google (doesnt work)

What might cause the problem:
Added the ‘Host-only Adapter’ network to the virtual box

remove static ip from /etc/network/interfaces (changed it back to dynamic)

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

#auto eth0
#iface eth0 inet static
#       address
#       netmask
#        network
#        broadcast
#        gateway

remove the 2nd network and only stayed with the 1st one (Bridged Adapter)

reflesh the MAC address (not sure if this help)


edit /etc/network/interfaces changed back to static ip address

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static

edit using the GUI

operating system:
Linux cowboy 3.12-kali1-686-pae #1 SMP Debian 3.12.6-2kali1 (2014-01-06) i686 GNU/Linux

Change Linksys WRT54G Default Gateway IP Address

Changing linksys local/default gateway ip address from to

1. Connect an Ethernet cord to you router LAN and your computer
2. Login into the router by opening a browser and typing
3. Go to Setup-> basic setup
4. change “Local IP Address:” to

5. Unplug the power to the router and Ethernet cord from the computer and wait 30 seconds
6. Plug everything back and you should now be able to log into router with
and if you run ipconfig in the command line you should see the default gateway as
also see other parts of the software with same ip address such as

7. Unplug the Ethernet cord from the computer and see if you can connect to it wireless
8. Plug the router WAN to the modem for internet.
9. You’ll need to configure you linksys router to get internet

Setting Up Linksys Router

10. Done.

The reason I needed this was because I have two routers and they cannot have both the same gateway

How to change the motorola router

Motorola SBG6580 Router / Modem