Skip to content

Instantly share code, notes, and snippets.

@arielsalminen
arielsalminen / 2col_masonry_layout.html
Last active October 15, 2016 21:22
Easily turn simple 1-column layout into a fluid 2-column masonry layout without JS plugins. Works even in IE6! Check the live example here: http://viljamis.com/columns/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>2-column fluid masonry layout without JS plugins</title>
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<style>
body {
text-align: center;
padding: 3% 8%;
$(document).keydown(function (event) {
if (event.ctrlKey) { return false; }
var code = (event.keyCode ? event.keyCode : event.which);
if (code == 17 || code == 224) { return false; }
});
$(function () {
$("body").bind('mousedown', function (event) {
if (event.target.id != 'ctl00_HeaderBox_header_TextBoxSearch' && !(event.target.id.toLowerCase().indexOf('img') == -1 || event.target.id.toLowerCase().indexOf('flash') == -1))
return false;
@Daniel15
Daniel15 / 1_README.md
Last active May 6, 2024 06:40
Complete Google Drive File Picker example

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/

@lucasr
lucasr / MainActivity.java
Last active November 20, 2017 19:02
Animated ListView with TransitionManager
package org.lucasr.transition.samples;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.transition.TransitionManager;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ListView;
@ericelliott
ericelliott / essential-javascript-links.md
Last active July 18, 2024 15:03
Essential JavaScript Links