- not exactly sample code, but after 'c++' and 'java' there should be bulleted lists that need an extra line of whitespace before them
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 | |
# run this as sudo | |
if (( $EUID != 0 )) ; then | |
echo "Please run as root" | |
else | |
echo "Installing required files" | |
apt-get install ant ant-contrib ant-contrib-cpptasks | |
if [ -e /usr/share/jara/ant-contrib.jar -a -e /usr/share/java/ant-contrib-cpptasks.jar ]; then echo "Installed"; fi | |
echo "Copying 'ant-contrib.jar'" | |
cp -s /usr/share/java/ant-contrib.jar /usr/share/ant/lib/ant-contrib.jar |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.eclim.eclimd</string> | |
<key>Program</key> | |
<string>/Users/jacob.gersztyn/Applications/Eclipse.app/Contents/Eclipse/eclimd</string> | |
<key>RunAtLoad</key> | |
<true/> |
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
// Add the required amount of entropy | |
boolean entropic = false; | |
CertificationSigningRequest csr = null; | |
final FileInputStream fin = new FileInputStream("/dev/urandom"); | |
byte[] b; | |
while (!entropic) { |
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
List<Contact> contacts = new Vector<Contact>(); | |
SecureCommsGroup group; | |
try { | |
// add some members to a List | |
contacts.add(saife.getContactsByName("client1").get(0)); | |
contacts.add(saife.getContactsByName("client2").get(0)); | |
contacts.addAll(saife.getContactsByName("user")); | |
} catch (final NoSuchContactException nsce) { | |
final String m = imse.getMessage(); |
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
SecureCommsGroup group; | |
List<String> groups = saife.ListGroups(); | |
try { | |
group = saife.getGroup(groups.get(0)); | |
} catch (final GroupNotFoundException gnfe) { | |
final String m = gnfe.getMessage(); | |
System.out.println(m); | |
} |
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
SecureCommsGroup group; | |
List<String> groups = saife.ListGroups(); | |
Contact contact; | |
try { | |
group = saife.getGroup(groups.get(0)); | |
contact = saife.getContactsByName("client1").get(0); | |
} catch (final NoSuchContactException nsce) { | |
final String m = nsce.getMessage(); | |
System.out.println(m); |
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
SecureCommsGroup group; | |
List<String> groups = saife.ListGroups(); | |
Contact contact; | |
try { | |
group = saife.getGroup(groups.get(0)); | |
contact = saife.getContactsByName("client1").get(0); | |
} catch (final NoSuchContactException nsce) { | |
final String m = nsce.getMessage(); | |
System.out.println(m); |
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
SecureCommsGroup group; | |
List<String> groups = saife.ListGroups(); | |
String message = "some message"; | |
try { | |
group = saife.getGroup(groups.get(0)); | |
} catch (final GroupNotFoundException gnfe) { | |
final String m = gnfe.getMessage(); | |
System.out.println(m); | |
} |
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
class MessageListener implements SecureCommsGroupListener { | |
public MessageListener() { | |
} | |
@Override | |
public void groupDestroyed(String groupID, String groupName) { | |
System.out.println("group was destroyed: " + groupName); | |
} |
OlderNewer