Skip to content

Instantly share code, notes, and snippets.

@awendland
awendland / html-starter-lessjs.html
Created December 21, 2014 03:11
Simple HTML starter file w/ Less.js for quick prototyping
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>An Amazing Title</title>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.min.css">
<link rel="stylesheet/less" type="text/css" href="style.less">
<script type="text/javascript"src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.1.2/less.min.js"></script>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@awendland
awendland / html-starter-simple.html
Last active August 29, 2015 14:11
Simple HTML starter file for quick prototyping
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>An Amazing Title</title>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.min.css">
<link rel="stylesheet" href="style.css">
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
@awendland
awendland / PasswordEncryptionService.java
Created July 29, 2013 22:38
A Java class for use in encrypting passwords and comparing previously encrypted passwords to clear-text passwords. Uses no dependencies outside of Java SE 6. Encryption uses the slow hashing algorithm PBKDF2 and generates salts using SecureRandom and SHA1. Adopted from code original posted at http://www.javacodegeeks.com/2012/05/secure-password-…
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.KeySpec;
import java.util.Arrays;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
/**