Archives

All posts for the month September, 2013

$ git clone https://github.com/insanum/gcalcli.git
$ cd gcalcli
$ sudo yum install python-gflags python-dateutil python-httplib2 python-pip
$ sudo pip install google-api-python-client
$./gcalcli (browswer should open and you need to authenticate to your google account, once that is successful…then jump back to your shell)

Show a week
$ ./gcalcli calw

Show a full month
$./gcalcli calm

Add an event
$ ./gcalcli –calendar ‘darren@unixdude.org’ –title ‘Your Mom my pad’ –where ‘YO Mommas’ –when ’12/12/2013 20:00′ –duration 120 –description ‘Play time with mommy’ –reminder 30 add

Verify the new event
$ ./gcalcli calm 12/2013
(will show month with your new event)

Add a quick note in current day, you MUST ALWAYS specify the calendar.
$ ./gcalcli quick –calendar ‘darren@unixdude.org’ ‘Going waterskiing with JohnnyPiper and Little JohnnyApples 8pm’

List all the calendars you have available
$ ./gcalcli list

Search the calendaras for events
$ ./gcalcli search Little

2013-09-07 8:00pm Going waterskiing with JohnnyPiper and Little JohnnyApples

Bunch more you can do like import vcs/vcal/ics files from Exchange etc. Can setup crons for helpful pop-up reminders, email notifications..etc

Read the man page for further details.

So I always forget this critical step when dealing with Keystore’s then for next couple of hours I’m breaking keyboards trying to figure out why it’s NOT working. You need to import your cacert from your CA into the java cacert keystore. This is different than the keystore you will be creating for your app.

Note: paths may be a little different for your setup..

Import it
$JAVA_HOME/bin/keytool -import -alias serverCert -file /ssl/cacert.pem -keystore /usr/java/latest/jre/lib/security/cacerts

Verify after it’s installed
$JAVA_HOME/bin/keytool -v -list -keystore /usr/java/latest/jre/lib/security/cacerts -alias serverCert

spawn – This option launches a shell command as a child process. For example, look at the following rule:

sshd : 192.168.5.5 : spawn /bin/echo /bin/date from %h >> /var/log/ssh.log : deny

Each time the rule is satisfied, the current date and the clients hostname %h is appended to the ssh.log file.

twist – This is an option which replaces the request with the specified command. For example, if you want to send to the client trying to connect using ssh to your machine, that they are prohibited from accessing SSH, you can use this option.

sshd : client1.xyz.com : twist /bin/echo “You are prohibited from accessing this service!!” : deny

When using spawn and twist, you can use a set of expressions. They are as follows :
%a — The client’s IP address.
%A — The server’s IP address.
%c — Supplies a variety of client information, such as the username and hostname, or the username and IP address.
%d — The daemon process name.
%h — The client’s hostname (or IP address, if the hostname is unavailable).
%H — The server’s hostname (or IP address, if the hostname is unavailable).
%n — The client’s hostname. If unavailable, unknown is printed. If the client’s hostname and host address do not match, paranoid is printed.
%N — The server’s hostname. If unavailable, unknown is printed. If the server’s hostname and host address do not match, paranoid is printed.
%p — The daemon process ID.
%s — Various types of server information, such as the daemon process and the host or IP address of the server.
%u — The client’s username. If unavailable, unknown is printed.