This file contains hidden or 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
| #!/usr/bin/env bash | |
| rm -rf "${HOME}/Library/Caches/CocoaPods" | |
| rm -rf "`pwd`/Pods/" | |
| pod update |
This file contains hidden or 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
| import UIKit | |
| class CornerFlowLayout: UICollectionViewFlowLayout { | |
| var itemTransform:CGFloat! | |
| override func layoutAttributesForElementsInRect(rect: CGRect) -> [UICollectionViewLayoutAttributes]? { | |
This file contains hidden or 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
| <form action="http://localhost:3000/submit/your@email.com" | |
| method="POST"> | |
| <input type="text", placeholder="Name", name="user[name]"> | |
| <input type="text", placeholder="Email", name="user[email]"> | |
| <input type="text", placeholder="Mobile", name="user[mobile]"> | |
| <input type="textarea", placeholder="Message", name="user[message]"> | |
| <select name="queryType"> | |
| <option value="A">A</option> | |
| <option value="B">B</option> | |
| <option value="C">C</option> |
This file contains hidden or 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
| """ | |
| >>> Tree = test_listing_2_8() | |
| >>> t = Tree(Tree("a", Tree("b", Tree("c", Tree("d"))))) | |
| >>> t.kids.next.next.val | |
| 'c' | |
| """ | |
| class Tree: | |
| def __init__(self, kids, next=None): | |
| self.kids = self.val = kids |
This file contains hidden or 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
| a, b, c, d, e, f, g, h = range(8) | |
| N = [ | |
| [0, 1, 1, 1, 1, 1, 0, 0], | |
| [0, 0, 1, 0, 1, 0, 0, 0], | |
| [0, 0, 0, 1, 0, 0, 0, 0], | |
| [0, 0, 0, 0, 1, 0, 0, 0], | |
| [0, 0, 0, 0, 0, 1, 0, 0], | |
| [0, 0, 1, 0, 0, 0, 1, 1], | |
| [0, 0, 0, 0, 0, 1, 0, 1], |
This file contains hidden or 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
| a, b, c, d, e, f, g, h = range(8) | |
| N = [ | |
| {b:2, c:1, d:3, e:9, f:4}, | |
| {c:4, e:3}, | |
| {d:8}, | |
| {e:7}, | |
| {f:5}, | |
| {c:2, g:2, h:2}, | |
| {f:1, h:6}, |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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
| a = [79, 50, 68, 71, 73, 31, 81, 30, 33, 94, 60, 63, 99, 81, 99, 96, 59, 73, 13] | |
| n = len(a) | |
| def is_even(n): | |
| return (n % 2 == 0) | |
| def is_odd(n): | |
| return (n % 2 != 0) | |
This file contains hidden or 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
| Bringing machine 'blimp' up with 'virtualbox' provider... | |
| ==> blimp: Importing base box 'ubuntu-12.04-amd64-daily'... | |
| ==> blimp: Matching MAC address for NAT networking... | |
| ==> blimp: Setting the name of the VM: blimp_blimp_1427302184848_68078 | |
| ==> blimp: Clearing any previously set forwarded ports... | |
| ==> blimp: Clearing any previously set network interfaces... | |
| ==> blimp: Preparing network interfaces based on configuration... | |
| blimp: Adapter 1: nat | |
| blimp: Adapter 2: hostonly | |
| ==> blimp: Forwarding ports... |