Skip to content

Instantly share code, notes, and snippets.

@janosgyerik
Last active December 18, 2015 12:59
Show Gist options
  • Save janosgyerik/5787166 to your computer and use it in GitHub Desktop.
Save janosgyerik/5787166 to your computer and use it in GitHub Desktop.
syntax highlighting with multiple languages

HTML5 boilerplate

<!DOCTYPE html>
<html lang="en-us">
    <head>
        <meta charset="utf-8">
        <title>HTML5 Boilerplate: The web's most popular front-end template</title>
        <meta name="description" content="HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites. Spend more time developing and less time reinventing the wheel.">
        <meta name="viewport" content="width=device-width">
        <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700">
        <link rel="stylesheet" href="css/main-7b3fecba68527e3c683b5ffed5a0c131.min.css">
        <script src="js/html5.js"></script>
    </head>
    <body>
    </body>
</html>

Creating the gh-pages branch

cd repository

git checkout --orphan gh-pages
# Creates our branch, without any parents (it's an orphan!)
# Switched to a new branch 'gh-pages'

git rm -rf .
# Remove all files from the old working tree
# rm '.gitignore'

Connecting to a Bluetooth device from Android

Socket socket = null;
try {
    device.createRfcommSocketToServiceRecord(MY_UUID);
    Method m = device.getClass().getMethod("createRfcommSocket", new Class[] {int.class});
    socket = (BluetoothSocket) m.invoke(device, 1);
} catch (IOException e) {
    Log.e(TAG, "create() failed", e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment