Entries Categorized as 'Scripts'

Ubuntu 16.04.02 Hang on Reboot or Shutdown

Date February 28, 2017

Had a problem after an update that when I force a restart or a shutdown on my server, it hangs on the last part of the process. To fix my problem, I had to edit the /etc/default/grub config file and added acpi=force apm=power_off to the config line, between the double quotation marks… 1 GRUB_CMDLINE_LINUX_DEFAULT=""GRUB_CMDLINE_LINUX_DEFAULT="" and […]

Heap Dump and Remote Tomcat 8-OpenJDK 8 Memory Monitoring

Date February 13, 2017

Memory problem.. the thorn of web apps… I have to connect to my remote server to monitor its memory usage and produce a heap dump. Bellow is the steps I had to configure the server to allow me to connect a remote monitor tool. Requirement: VisualVM app, download here Access your catalina.sh file. Look for […]

Enable Ubuntu 16.04 SSH Tunneling at Boot Time

Date September 16, 2016

I wanted to connect to a remote server and setup a tunnel for my MariaDB replication ( yes I migrated to MariaDB ), the only problem was that sometimes the net is erratic and can’t connect right away on boot time. Found a code online to check for ping reply, if it does, continue with […]

MySQL 5.6 and Up: High Memory Usage

Date April 27, 2016

Had a problem with a fresh install of MySQL 5.7 using more than normal memory. Researching around the net, one feature that was added (5.6?) that fixed my problem was performance schema ( performance_schema ). Disabling is easy enough as adding performance_schema=0 in my.cnf config file.   Thanks to Joel Abraham for the fix.

Connecting to MySQL on a Remote Server through Port Forwarding and Reverse SSH Tunnel

Date March 9, 2016

I had a problem connecting to a remote server that has its ports blocked by the ISP. So technically, I can’t port forward my way into the server. The only way around this is to SSH connect from my remote server to my main server and access the remote server via reverse SSH tunneling. This […]

ExtJS/Sencha Paging Event Handling and Custom Parameters

Date November 27, 2012

Sencha ( formerly ExtJS ) has a cool paging toolbar at the bottom of their Grid List component. There are sometimes scenarios that I want to pass values, lets say ID or search terms, for the next/previous page to retrieve. Sadly the buttons ( First, Previous, Next, Last and Refresh ) does not have any […]

MySQL: Query Real Values from Delimiter-Separated-String-IDs

Date September 15, 2008

I had a problem in using a string-comma-separated-value returned from a query in an “IN” statement. I used the IDs from one table, concat them into a comma separated value and insert them into another table. Baaaad idea… Now when I query that value, I can’t use it directly into an “IN” statement to retrieve […]

Friendster Script

Date August 14, 2007

Well, seems like a problem crept into a friend’s Friendster account. Everything in her page disappeared, or so it seems. The problem lay inside the shoutbox. A rouge script has inserted a small CSS script inside and made every “Div” element invisible. How? I dont know. I made this script for her to run under […]