Skip to content

Instantly share code, notes, and snippets.

class GCFixedColumnHorizontalScrollingCollectionViewFlowLayout: UICollectionViewFlowLayout {
var numberOfRows: UInt = 0
var numberOfFixedColumns: UInt = 0
var columnWidth: UInt = 0
init(numberOfFixedColumns: UInt, columnWidth: UInt) {
self.numberOfFixedColumns = numberOfFixedColumns
self.columnWidth = columnWidth
super.init()
self.scrollDirection = .Horizontal
@inlinestyle
inlinestyle / flow-disjoint-union-checking.js
Created August 30, 2016 15:19
Example of flow disjoint union checking not carrying through closures
// @flow
type A = {
lower: 'a'
}
type B = {
lower: 'b',
bMethod: Function
}
<!DOCTYPE html>
<html>
<head>
<title>4 Boxes</title>
</head>
<body>
<div id="parent">
<div id="child">
</div>
</div>
<!DOCTYPE html>
<html>
<head>
<title>Centering with Flexbox</title>
</head>
<body>
<div id="parent">
<div id="child">
</div>
</div>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div id="BensCoolDiv">
I am the content!
</div>
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSS Zen Garden: The Beauty of CSS Design</title>
<link rel="stylesheet" type="text/css" href="zenstarter.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSS Zen Garden: The Beauty of CSS Design</title>
<link rel="stylesheet" type="text/css" href="zenstarter.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSS Zen Garden: The Beauty of CSS Design</title>
<link rel="stylesheet" type="text/css" href="zenstarter.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!DOCTYPE html>
<html>
<head>
<title>jQuery Fun House Starter Code</title>
</head>
<body>
<div class="section">
<h1>What is your name?
<input id="name">
</h1>
<!DOCTYPE html>
<html>
<head>
<title>jQuery Fun House Solution Code</title>
</head>
<body>
<div class="section">
<h1>What is your name?
<input id="name">
</h1>