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
| <template name="createDiscussionForm"> | |
| {{> quickForm collection="Discussions" id="createDiscussionForm" type="insert"}} | |
| </template> | |
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
| from bottle import route, run, template | |
| def createMagicSquare(n): | |
| magicSquare = [[0]*n for i in range(n)] | |
| # first position | |
| loc = (0, n/2) | |
| for i in range(1, (n*n)+1): | |
| magicSquare[loc[0]][loc[1]] = i |
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 Meteor from 'react-native-meteor' | |
| import _ from 'lodash' | |
| import Trackr from 'trackr' | |
| import EJSON from 'ejson' | |
| const SubsManager = function (options) { | |
| const self = this | |
| self.options = options || {} | |
| // maxiumum number of subscriptions are cached | |
| self.options.cacheLimit = self.options.cacheLimit || 10 |
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 ApolloClient from 'apollo-client' | |
| import Settings from './settings' | |
| import { meteorClientConfig } from './meteorApolloClient' | |
| const networkOptions = { uri: Settings.GRAPHQL_URL } | |
| export const client = new ApolloClient(meteorClientConfig(networkOptions)) |
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
| dialogConfirm('Are you sure you would like to delete this item?', { | |
| title: 'Delete item', | |
| confirmText: 'Delete', | |
| red: true, | |
| }).then( | |
| () => { | |
| // delete item | |
| console.log('delete item') | |
| }, | |
| () => { |
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
| yarn link # in the root of the forked package | |
| yarn link package-name # in the root of your project |
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 * as React from 'react' | |
| import styled from 'styled-components' | |
| const Container = styled.div<{ light?: boolean }>` | |
| display: inline-block; | |
| /* when using inline-block and overflow: hidden the text rises unless using v align bottom */ | |
| vertical-align: bottom; | |
| margin-left: 8px; | |
| font-size: 18px; | |
| max-width: 280px; |
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 { Field, ObjectType, ID } from 'type-graphql' | |
| import { | |
| Entity, | |
| ObjectIdColumn, | |
| ObjectID, | |
| Column, | |
| CreateDateColumn, | |
| UpdateDateColumn, | |
| } from 'typeorm' |
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
| declare module 'sanctuary' { | |
| type maybeToNullable<A> = (p: Maybe<A>) => Nullable<A>; | |
| type Nullable<A> = A | null; | |
| type Pair<A, B> = [A, B]; | |
| type Thunk<A> = () => A; | |
| type Fn<A, B> = (a: A) => B; |
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 { Field, ObjectType, ID } from 'type-graphql' | |
| import { | |
| Entity, | |
| ObjectIdColumn, | |
| ObjectID, | |
| Column, | |
| CreateDateColumn, | |
| UpdateDateColumn, | |
| } from 'typeorm' |
OlderNewer