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
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| struct Obj { | |
| let id: String | |
| init(id: String) { | |
| self.id = id | |
| } | |
| } |
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
| var support = function() { | |
| var str = 'Teespring'; | |
| try { | |
| localStorage.setItem(mod, mod); | |
| localStorage.removeItem(mod); | |
| return true; | |
| } catch(e) { | |
| return false; | |
| } | |
| }(); |
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
| func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell{ | |
| guard let cell = tableView.dequeueReusableCellWithIdentifier("roundsIdentifier", forIndexPath:indexPath) as? CustomRoundsTableViewCell else { | |
| return UITableViewCell() | |
| } | |
| let round = roundsArray[indexPath.row] | |
| cell.roundNumberLabel?.text = "Round \(round.value)" | |
| cell.redScoreLabel?.text = String(round.redScore) |
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
| Plugin 'Valloric/YouCompleteMe' " autocomplete | |
| Plugin 'marijnh/tern_for_vim' | |
| Plugin 'pangloss/vim-javascript' " js syntax | |
| Plugin 'Raimondi/delimitMate' | |
| Plugin 'scrooloose/syntastic' | |
| Plugin 'fatih/vim-go' " go syntax | |
| Plugin 'tpope/vim-rails' " rails | |
| Plugin 'tpope/vim-haml' " haml/sass/scss | |
| Plugin 'elzr/vim-json' " format json |
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
| def leopard | |
| end |
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
| func VowelRemover(str: String) -> String { | |
| let vowels: [Character] = ["a", "e", "i", "o", "u"] | |
| let chars = str.characters.filter { !vowels.contains($0) }.map { String($0) } | |
| return chars.joinWithSeparator("") | |
| // 1 liner | |
| // str.characters.filter { !["a", "e", "i", "o", "u"].contains($0) }.map { String($0) }.joinWithSeparator("") | |
| } |
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
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| print("hello") | |
| func generateRoute(coords: [(Double, Double)]) -> [(Double, Double)] { | |
| var route = [(Double, Double)]() | |
| for (i, coord) in coords.enumerate() { | |
| guard i > 0 else { continue } |
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
| #include <stdio.h> | |
| #include <math.h> | |
| int main() | |
| { | |
| float pi = 3.141592; | |
| float i; | |
| float bulb1; | |
| float bulb2; | |
| float bulb3; |
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
| func collectionView(_ collectionView: UICollectionView, | |
| layout collectionViewLayout: UICollectionViewLayout, | |
| sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize |
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
| NSArry *bxLats = @[ | |
| @(40.820045), | |
| @(40.821045), | |
| @(40.822045), | |
| @(40.823045), | |
| @(40.824045), | |
| @(40.825045), | |
| @(40.826045), | |
| @(40.827045), | |
| @(40.828045), |