Recent Notes

Displaying notes 81 - 90
Created by Dr. Xi on November 01, 2013 10:23:45    Last update: November 01, 2013 10:23:45
This example class generates and verifies RSA signature on a test file. import java.io.*; import java.security.*; im...
Created by Dr. Xi on November 01, 2013 10:17:57    Last update: November 01, 2013 10:17:57
This example class reads a RSA private key file in PEM format. import java.io.*; import java.security.*; im...
Created by Dr. Xi on October 31, 2013 18:17:09    Last update: October 31, 2013 18:17:09
You have a PGP public in PEM format, which cannot be stored in a Java key store. But you have the PEM encoded public key file. This class reads the file and creates a public key class in Java. Example key file: -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0B... Java code: import java.io.*; import java.security.*; im...
Created by James on October 16, 2013 09:14:24    Last update: October 16, 2013 09:14:24
The initial attempt was to compile the bunch of LESS files with: lessc less/* But then I got errors like: NameError: variable @line-height-computed is undef... The order of LESS files listed is important. Variables are defined in variables.less , so it should be listed first. For Bootstrap, the ordering is defined in bootstrap.less . So all you have to do is ( this is the right way ): lessc bootstrap.less bootstrap-compiled.css Just for the reference, this is the content of bpptstrap.css : /*! * Bootstrap v3.0.0 * * Copyright 2...
Created by Dr. Xi on October 14, 2013 13:49:41    Last update: October 14, 2013 13:49:41
Enter django interactive shell: $ python manage.py shell Create the openid tables: >>> from django.db import connection >>> connec...
Created by voodoo on July 09, 2010 21:24:22    Last update: October 13, 2013 09:29:08
To resolve the error: [focus@bamboo ~]$ psql -U postgres -W Password ... Edit /var/lib/pgsql/data/pg_hba.conf , change ident to trust , then restart postgres: # TYPE DATABASE USER CIDR-ADDRESS ... Update: For version 9.1 on Ubuntu, the file is /etc/postgresql/9.1/main/pg_hba.conf , trust is changed to md5 .
Created by Dr. Xi on October 12, 2013 13:06:55    Last update: October 12, 2013 13:06:55
Generate the ssh keys: $ ssh-keygen -t rsa Generating public/private r... Convert the ssh public key to PEM format: $ cd .ssh ~/.ssh$ ssh-keygen -f mykey.pub -e -m...
Created by Fang on October 10, 2013 12:48:19    Last update: October 10, 2013 12:48:19
Sample code to copy a file with Java nio. import java.io.*; import java.nio.channels.File...
Created by Fang on October 09, 2013 14:40:59    Last update: October 09, 2013 14:40:59
This example adds Salesforce dataloader jar to a Maven project. Create a project local repository and install the Salesforce jar (oneline, broken up for readability). mvn install:install-file -DlocalRepositoryPath=m2r... Add repository and dependency in pom.xml : <repositories> <repository> <id>m2repo...
Created by Dr. Xi on September 24, 2013 15:01:38    Last update: September 24, 2013 15:01:38
Use od to hex-encode a binary string: $ echo 0wj4wDU5EiZXLdQI5bJdrsLoienVCIaMZy6/VSrykAA...
Previous  4 5 6 7 8 9 10 11 12 13 Next