id `whoami`
sudo mount -t cifs -v //<drive ip address>/Media -o username=<drive user>,password=<drive passwd>,uid=1000,gid=1000 /home/User/Media/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/questions/125171/passing-a-regex-substitution-as-a-variable-in-perl | |
$pattern = qr/foo/; | |
print "match!\n" if $text =~ $pattern; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://www.roseindia.net/java/example/java/io/java-write-to-file.shtml | |
// Tidy up the syntax by writting it this way... | |
// Check if fd can be a File obj or the textual name of the file | |
// http://docs.oracle.com/javase/1.4.2/docs/api/java/io/FileOutputStream.html | |
BufferredWriter buffWrite = new BufferredWriter(new FileOutputStream(fd)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd `ls -1t | sed -n 1p` # cd to latest dir | |
unzip *.zip -d deploydir/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub current_date{ | |
my ($d,$m,$y) = (localtime)[3,4,5]; | |
# Normalise dates | |
($m+=1,$y+=1900); | |
# Check prefix with zero | |
$m = "0$m" if ($m < 10); | |
$d = "0$d" if ($d < 10); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub trim($) { | |
my $string = shift; | |
$string =~ s/^\s+//; | |
$string =~ s/\s+$//; | |
return $string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ok apologies if this is a bit long. I scraped much of it from notes (I added the swear words!) and some from my dev experience. | |
Think like a user. A person goes to your website to accomplish a goal (buy something, find the cheapest price for something, get informed on the product etc) design the site to meet the goals of the user. | |
Remember a website is just text, pictures, etc generated by a machine. No one cares if a machine says please or thank you. Customer Service assumes some sort of human interaction, every instance of customer service should be considered a FAILURE. Every time a customer has to contact a human means that something could not be accomplished via the website/application, this takes more time to accomplish, more frustrating. This leads to customer being less likely to buy the product. From the sellers perspective the less people they need to pay to answer questions. If you need customer service pick up the phone. | |
A website can not treat you as a human and I have never closed a ta |
NewerOlder