Author Archives: turbo124 - Page 2

php-wkhtmltox

wkhtmltox is a great piece of kit to convert webpages to PDF format.

It is – however – an absolute Pita to install, as there are minimal resources on the net for installing this onto a Linux Server.

DNS Cache Flush Mac OS X


dscacheutil -flushcache

Resize XEN VM disk and Swap Disk

master:~# fdisk /dev/xvda

Command (m for help): p
Command (m for help): d

Partition number (1-4):<enter partition number>

Xcode 4 Source Control Woes

I spent an age trying to work out why i couldn’t check out my code from a SVN REPO.

So turns out Xcode will not allow you to download from a SVN source that uses a untrusted SSL certificate.

Disk speed VPS, how fast?


dd if=/dev/zero of=test bs=64k count=512 oflag=dsync

PCRE unicode support CENTOS

Centos PCRE repo is 6.6, and cannot be YUM REMOVED without removing hundred of dependancies…

I needed to install PCRE with unicode support which meant compiling my own package.

Logrotate

Rotating your log files will save you a bunch of space from bloated web logs growing out of control. Logrotate is easily customisable to suit any needs.

IndexPath Row from sub-function

Ever wondered how you could generate the IndexPath row from a Function not related to tableview?

 
	UITableViewCell *clickedCell = (UITableViewCell *)[[sender superview] superview];
	NSIndexPath *clickedButtonPath = [_tableView indexPathForCell:clickedCell];
	int row = [clickedButtonPath row];
	NSLog(@"%i",row);

Subversion + Lighttpd + Apache

 
 
yum install  -y subversion mod_dav_svn
 
 
groupadd svn
useradd svn
 
mkdir -pm700 /var/svn/projects
svnadmin create /var/svn/projects/test
chown -R svn:svn /var/svn/projects
 
mkdir -p /var/www/projects.example.com/httpdocs

edit httpd.conf

 
 
 
Listen 8080
 
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

Change the user and Group from apache:apache to svn:svn

 
 
 
User svn
Group svn

Add a virtual host.

97e9595f6aa32a8d317650a0d39872f1013

Hide UI Keyboard, back to basics

in ViewDidLoad set the UITextfield delegate to self, and assign to the firstresponder like this

- (void)viewDidLoad {
	[textfield setDelegate:self];
	[textfield becomeFirstResponder];
}
- (BOOL)textFieldShouldReturn:(UITextField *)textfield
{
	[textfield resignFirstResponder];
 
}