Posted on 02 January 2012 by Chris
A lot of people have used the recent jailbreak tool RedSn0w to unlock their devices. Most have found that this is causing iBooks to no longer open or crash when opening after the jailbreak is done. Thanks Apple. Luckily, some tools have been created to fix this, however not everyone is getting the results they want with it. The issue with the tools looks to be that they are not fixing the permissions correctly when the iBooks files are moved to /var/stash. We found that with an extra step, you can get that working correctly.
First off, you will want to download SBSettings for the BigBoss repo. This repo have came installed with Cydia, so you shouldn’t need to add anything new. Once SBSettings is installed, your device should respring and take you back to the lockscreen.
Now, you will want to install iBooks by using the iBooks Fix for iOS 5 app found in the xsellize repo. To add this, you will need to go to Cydia > Sources > edit > add, then add http://cydia.xsellize.com/. You will get a warning and can just click ok. You can then search for iBooks fix for iOS 5 and install it. Once it has finished installing, it should respring once more.
Now, you should be back at your lockscreen once more. You will now want to go into the SBSettings app, then to System options, which is towards the bottom. Once you are there, just click the “fix user dir permissions.”. It will then fix the permissions of all your files. Your device should respring one more time.
Now, you should be able to open up and use iBooks without a problem. Let us know if this works for you in the comments!
Posted on 15 December 2011 by Chris
New addition to the site! Find the country, city, state and ISP of any IP address. Check it out here:
RandomLinux.com IP lookup
Posted on 04 November 2011 by Chris
If you use a RSS feed aggregator for wordpress, you could end up with quite a few drafts that you will never use and need to remove. There are plugins for WordPress that will take care of this issue for you, however from my experience, they tend to be slow and can time out.
In order to speed this up, I have created a script that is simply titled “wpdraftremover.” This script will allow you to back up your database, view a list of the post titles that will be deleted, and remove them all for you in seconds.
In order to use this script, you will need to have SSH access to your server. Then, from the same folder as your wp-config.php file, you will want to run the following command:
bash <(GET randomlinux.com/wpdraftremover)
That will allow you to run the script without having to save the file. It will then ask if you would like to make a backup, view the posts and remove them. Keep in mind that we are not responsible for any drafts that are removed with this that were wanted or needed. Check the list before removing anything!
Any feedback is welcome! Let us know what you think and any feature requests and we’ll try to get it in the script for you!
Posted on 11 October 2011 by Chris
If you use an autotagging plugin in WordPress and you remove some posts, you may have tags left over in your database that are no longer being used. Since I’ve had that problem and couldn’t find a plugin to do what I wanted, I decided to write a script to remove those. You can see the source of this at http://randomlinux.com/tagremover.
To use this, you will need to ssh into your server and run the following command in the same directory as your wp-config.php file.
wget http://randomlinux.com/tagremover && sh tagremover
That will run the file, show your unused tags and prompt you to delete them. Keep in mind that this has only been tested on a few sites, so your results are not guaranteed and I am not responsible for anything that happens. Be sure to take a backup of your database, just in case. Come to think of it, I’ll make it do that automatically in the next update
We would love feedback on the script, as well as anything that would be beneficial to you that could be added!
Posted on 08 May 2011 by Geoff
#Apache httpd.conf tweak: prefork.c module
#Add this to httpd.conf
=====================
<IfModule prefork.c>
StartServers 15
MinSpareServers 10
MaxSpareServers 40
ServerLimit 256Max
Clients 256
MaxRequestsPerChild 1000
</IfModule>
=====================
#mysql tweak:
#add this to my.cnf
=====================
key_buffer = 48
Mmax_allowed_packet = 8M
table_cache = 128
sort_buffer_size = 48M
net_buffer_length = 8M
thread_cache_size = 4
query_cache_type = 1
query_cache_size = 4M
=====================
#Another mysql tweak:
#add to my.cnf
max_connections = 200
bind-address = 127.0.0.1
safe-show-database
skip-locking
skip-innodb
# MySQL 4.x has query caching available.
# Enable it for vast improvement and it may be all you need to tweak.
query_cache_type=1
query_cache_limit=1M
query_cache_size=32M
interactive_timeout=100
# Reduced wait_timeout to prevent idle clients holding connections.
wait_timeout=15
connect_timeout=10
# Checked opened tables and adjusted accordingly after running for a while.
table_cache=512
# Reduced it to 32 to prevent memory hogging.
thread_cache=32
# Reduced it by checking current size of *.MYI
files.key_buffer=128M
thread_concurrency=1
log_error = /var/log/mysql/error.log
# log slow queries is a must.
log_slow_queries=/var/log/mysqld.slow.log
long_query_time=2
[mysqldump]
quick
max_allowed_packet=16M
[mysql]
no-auto-rehash
[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M
[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M
[mysqlhotcopy]
interactive-timeout
=====================
Posted on 24 April 2011 by Chris
Just wanted to say Happy Easter to all of the randomlinux.com readers! Thank you so much for all of your support so far!
Posted on 23 April 2011 by Chris
If you are writing a shell script and you are needing to have a variable set by getting user input, you can do so using read. If you are needing to get a variable set, you can use read along with the variable name.
read value
Then whatever the user inputs at the prompt will be come the value for the variable “value.” This example will show you how to incorporate it into your script.
#!/bin/bash
echo “Please input a value”
read value
echo “The value that you entered is $value”
Will come out looking like this when you run it, stopping to ask the user for a value and waiting for them to input one.
# ./example
Please input a value
5
The value that you entered is 5
You could also just use read -p to pause and make the user hit a key to continue.
#!/bin/bash
read -p “Press any key to create a password”
pass=`mkpasswd -s 0 -p 12`
echo “Your new password is $pass”
Which would come out looking like this when they hit a key.
# ./example
Press any key to create a password
Your new password is 6bj8esuPE
Let us know how you use read by commenting below or adding to the conversation in our Forum Thread