Tools -> Macros -> Organize Macros -> (LibreOffice|OpenOffice) Basic

Click Edit, and paste the following in there: (not responsible for any errors, but please let me know if there are any!)

Function Tax(year,amount)
 m1=-1
 ret=-1
 if (year = 2005) then
 m1=6000
 m2=21600
 m3=58000
 m4=70000
 r1=.17
 r2=.3
 r3=.42
 r4=.45
 elseif (year = 2006) then
 m1=6000
 m2=21600
 m3=63000
 m4=95000
 r1=.15
 r2=.3
 r3=.42
 r4=.47
 elseif (year = 2007) then
 m1=6000
 m2=25000
 m3=75000
 m4=150000
 r1=.15
 r2=.3
 r3=.40
 r4=.45
 elseif (year = 2008) then
 m1=6000
 m2=30000
 m3=75000
 m4=150000
 r1=.15
 r2=.3
 r3=.40
 r4=.45
 elseif (year = 2009) then
 m1=6000
 m2=34000
 m3=80000
 m4=180000
 r1=.15
 r2=.3
 r3=.4
 r4=.45
 elseif (year = 2010) then
 m1=6000
 m2=35000
 m3=80000
 m4=180000
 r1=.15
 r2=.3
 r3=.38
 r4=.45
 elseif (year = 2011) then
 m1=6000
 m2=37000
 m3=80000
 m4=180000
 r1=.15
 r2=.3
 r3=.37
 r4=.45
 elseif (year = 2012) then
 m1=6000
 m2=37000
 m3=80000
 m4=180000
 r1=.15
 r2=.3
 r3=.37
 r4=.45
 elseif (year = 2013) then
 m1=18200
 m2=37000
 m3=80000
 m4=180000
 r1=.19
 r2=.325
 r3=.37
 r4=.45     
 else
 ret=-1
 endif
 if (m1 = -1) then
 ret = -1
 else
 if (amount < m1) then
 ret = 0
 elseif (amount <= m2) then
 ret = (amount-m1) * r1
 elseif (amount <= m3) then
 ret = (amount-m2) * r2 + (m2-m1) * r1
 elseif (amount <= m4) then
 ret = (amount-m3) * r3 + (m3-m2) * r2 + (m2-m1) * r1
 else
 ret = (amount-m4) * r4 + (m4-m3) * r3 + (m3-m2) * r2 + (m2-m1) * r1
 endif
 endif
 Tax=ret
End Function

Function Tax2013( amount )
 Tax2013 = Tax(2013,amount)
End Function
Function Tax2012( amount )
 Tax2012 = Tax(2012,amount)
End Function
Function Tax2011( amount )
 Tax2011 = Tax(2011,amount)
End Function
Function Tax2010( amount )
 Tax2010 = Tax(2010,amount)
End Function
Function Tax2009( amount )
 Tax2009 = Tax(2009,amount)
End Function
Function Tax2008( amount )
 Tax2008 = Tax(2008,amount)
End Function
Function Tax2007( amount )
 Tax2007 = Tax(2007,amount)
End Function
Function Tax2006( amount )
 Tax2006 = Tax(2006,amount)
End Function
Function Tax2005( amount )
 Tax2005 = Tax(2005,amount)
End Function

Say you earned $44,000

=Tax(2013,44000)

or

=Tax2013(44000)

And now some notes so that people can find this post. This post has the formula for Australia tax 2013, 2012, and lots of previous years. Very easy to use function to calculate Australian taxes for open office and libre office, which I call oocalc. I hope you find it useful, it’s certainly saved me a lot of time.
 

You can might be getting “TypeEror: closestHandle is undefined” or “TypeError: s is undefined” if you are using a slider with negative numbers.

I’m able to reproduce is here:

broken: http://jsbin.com/epowu3/3/edit

but the solution is easy.  Min and max are numbers, not strings, and “-100″+10 == “-10010″

so change “100″ to 100 and “-100″ to -100, and all works well as seen here:

works: http://jsbin.com/epowu3/4/edit

have fun.

Cameron

 

It’s a free alternative to RedHat Enterprise. When I say alternative, I mean it’s a copy of it, as the GPL allows that! These guys do a great job. My vote for best distro for commercial use.

http://www.centos.org/

G’Day,

Although we compete with picnik, it’s sad to see it go.  Enough of that.  Check out our awesome HTML5 image/photo editor!

http://www.imagebot.com/

It’s so easy to make fun photo effects, has great stickers, easy logos, and so much more.

have fun,

Cameron

 

Thanks to muks for this, there is no way I would remember this so:

openssl s_client -connect mail.gimp.org:25 -starttls smtp

shows that the name is for mail.gtk.org, which is probably bad.

the output looks something like:


CONNECTED(00000003)
depth=1 /C=US/ST=Minnesota/L=Robbinsdale/O=gtk.org/CN=gtk.org CA/emailAddress=ca@gtk.org
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
 0 s:/C=US/ST=Minnesota/O=gtk.org/CN=mail.gtk.org/emailAddress=ca@gtk.org
 i:/C=US/ST=Minnesota/L=Robbinsdale/O=gtk.org/CN=gtk.org CA/emailAddress=ca@gtk.org
 1 s:/C=US/ST=Minnesota/L=Robbinsdale/O=gtk.org/CN=gtk.org CA/emailAddress=ca@gtk.org
 i:/C=US/ST=Minnesota/L=Robbinsdale/O=gtk.org/CN=gtk.org CA/emailAddress=ca@gtk.org
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIEZTCCA02gAwIBAgIBATANBgkqhkiG9w0BAQQFADB5MQswCQYDVQQGEwJVUzES
MBAGA1UECBMJTWlubmVzb3RhMRQwEgYDVQQHEwtSb2JiaW5zZGFsZTEQMA4GA1UE
ChMHZ3RrLm9yZzETMBEGA1UEAxMKZ3RrLm9yZyBDQTEZMBcGCSqGSIb3DQEJARYK
Y2FAZ3RrLm9yZzAeFw0wOTA0MTEwMDA1NDRaFw0xOTA0MDkwMDA1NDRaMGUxCzAJ
BgNVBAYTAlVTMRIwEAYDVQQIEwlNaW5uZXNvdGExEDAOBgNVBAoTB2d0ay5vcmcx
FTATBgNVBAMTDG1haWwuZ3RrLm9yZzEZMBcGCSqGSIb3DQEJARYKY2FAZ3RrLm9y
ZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMS8INsrdFmXc2rFJp46
Z9OK+okWIh4zDiYc3o5sDNAawJnyxEXAL/MR6BjE7EFHMDVGw/gH2RqJ6/q6wPiU
RhXkwwcNdS9JlGw/z3XQYcvsvpGnRZp47A/Vgr66AallcGdB5UIsRMel7d8uDMSI
jziOxmFX/8iADF3SJrQ4DPNu6EPnvRTRPWSsPvpjrVky5y//J+XyQh9qzPrB9yKb
LCgkbHjWSfpYfuPgkqD7uqAi2fJdyCf4jmgf2k08yT1lQJE3aOa6V9qDsWf5FQ0H
a4oWgvGICv7FZkwHlYTAv8ePkAqrucZY0sYCN5G7MKqS2vTP2pGh+yRmm+x0MzvK
97MCAwEAAaOCAQowggEGMAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5T
U0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBQJwtbZWPsXwYi5LWii
h0az5S7QlDCBqwYDVR0jBIGjMIGggBQSdfM2tNf6+ivDLr7sCH/JaVUHAKF9pHsw
eTELMAkGA1UEBhMCVVMxEjAQBgNVBAgTCU1pbm5lc290YTEUMBIGA1UEBxMLUm9i
Ymluc2RhbGUxEDAOBgNVBAoTB2d0ay5vcmcxEzARBgNVBAMTCmd0ay5vcmcgQ0Ex
GTAXBgkqhkiG9w0BCQEWCmNhQGd0ay5vcmeCCQCFGCHaayHXtDANBgkqhkiG9w0B
AQQFAAOCAQEAfMXEDd46L1HfoBp4puRZKuoP4RQnsvttExmg9lqrCvWiIynq0Ijr
7f5gBFgtkgeUu9RX80sttqdcX44jM4IaYAfsbx+sPn8HKEhnH8Bz09Eh5Tvm1mXZ
JZDIKTbkW7BtmwhiB2umX2rmnx0X3ITM3PIgiEpbsytT+MSRdZLNmg3jfiF2SRY8
t15uF3zva7NwR1Sru4P+mz84sPcUt/AtLqZQ2NKFraE2ExClJYuxoFVD8jR+0tzr
uezf3sR/b0K88jmgiXvoMjg+e2j/Q7ckuey3yHeYKoAgp9II/yxYCHh+0b436FQP
0Tp1MgrcpMZYAnO2uizufj6vhA5gB0BaWw==
-----END CERTIFICATE-----
subject=/C=US/ST=Minnesota/O=gtk.org/CN=mail.gtk.org/emailAddress=ca@gtk.org
issuer=/C=US/ST=Minnesota/L=Robbinsdale/O=gtk.org/CN=gtk.org CA/emailAddress=ca@gtk.org
---
No client certificate CA names sent
---
SSL handshake has read 3112 bytes and written 354 bytes
---
New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
 Protocol  : TLSv1
 Cipher    : DHE-RSA-AES256-SHA
 Session-ID: AC9ADA55403F144FF35FB970898628A130565EFF84E85E0F06A4252B8A3C01FE
 Session-ID-ctx:
 Master-Key: 3CAF412A90FD9844ECDC08C6669C483733E9618591850B57AEB161E4AE3866AF4E560F18B313709C5B94943351AE1B2D
 Key-Arg   : None
 Krb5 Principal: None
 Start Time: 1326071730
 Timeout   : 300 (sec)
 Verify return code: 19 (self signed certificate in certificate chain)
---
250 DSN

 

CentOS 6.2

If you want to upgrade from CentOS 6.0 or 6.1, all you need to do is run “yum update” as root, and then reboot.  The reboot is required because the kernel is updated.

If you have CentOS 5.x or 4.x, then there is no path for you to update.  For the adventurous, you can certainly get it to work, but you’ll be in for some pain.  Check the release notes for some ideas on where to start: http://wiki.centos.org/Manuals/ReleaseNotes/CentOS6.2

The new installer in the 6.x release is a little easier to use, and the boot times are certainly much better.

If you use netinstall, then the URL containing the centos installation image for 64bit is:

http://mirror.centos.org/centos/6.2/os/x86_64/

And if for some crazy reason you are still using 32bit:

http://mirror.centos.org/centos/6.2/os/i386/

I’m a little at a loss as to why these URL’s aren’t in the installer by default.

have fun,

Cameron

 

I just had to post how much I love valgrind.

I have a long live C program that once ran for 400 days straight serving out requests for my website.  It ran for so long that “ps’ just showed the year that it was started :)   Anyway  enhancements over the years have introduced some memory leaks, and within a number of hours, I had fixed all the leaks.  Some of the changes were in code I hadn’t touched for years.  It just makes things so easy.  So .. thanks Julian!

Cameron

 

finally! Here is the post from Karinbar:

http://www.karan.org/blog/index.php/2011/07/10/release-for-centos-6-0-i386-and-x86-64

congrats to all the guys who made that happen. Certainly seemed to be a bit trickier than last time.
It might not be too long before 6.1 also comes out, so if you are thinking of a major upgrade, you might consider waiting (although 6.0 will upgrade automatically anyway).

Cameron

FireFox 4

If you just download the firefox tar, then you’ll get an error:

 ./firefox-bin: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

or

./firefox-bin: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/cameron/firefox/libxul.so)

To fix this follow these steps.

cd ~
download the file: firefox-4.0.tar.bz2
tar xvf firefox-4.0.tar.bz2
cd firefox
download the fedora rpm: libstdc++
rpm2cpio libstdc++-4.3.0-8.i386.rpm | cpio -i --make-directories
#note the lack of / at front of usr/lib in the line below
mv usr/lib/libstdc++.so.6* .
rmdir usr/lib usr

hope that helps..

Cameron
Check out my new HTML5 app at: http://imagebot.com

I get the following when I install firefox 4 on ubuntu:

exec: 398: firefox/firefox-bin: not found

Ubuntu

If you are trying to install firefox 4 for ubuntu, you also need

sudo apt-get install ia32-libs

It’s about 40meg, and after that you can either run it from the command line (firefox/firefox) or double click on “firefox” from gnome.