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 telethon import TelegramClient, sync | |
| # Use your own values here | |
| api_id = '123456' | |
| api_hash = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
| channel = 'channel_name' | |
| client = TelegramClient('Session_details', api_id, api_hash) | |
| phone_number='0000000000' |
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
| const cutoffString = '2017-12-12 10:20:20'; | |
| const utcCutoff = moment.utc(cutoffString, 'YYYYMMDD HH:mm:ss'); | |
| const displayCutoff = utcCutoff.clone().tz('America/New_York'); |
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
| { | |
| // Place your snippets for javascriptreact here. Each snippet is defined under a snippet name and has a prefix, body and | |
| // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
| // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
| // same ids are connected. | |
| // Example: | |
| // "Print to console": { | |
| // "prefix": "log", | |
| // "body": [ | |
| // "console.log('$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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "appsync:GraphQL" | |
| ], | |
| "Resource": [ | |
| "arn:aws:appsync:<AWS region>:<AWS account ID>:apis/<app sync endpoint 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
| import * as React from "react"; | |
| import * as ReactDOM from "react-dom"; | |
| import { BrowserRouter } from "react-router-dom"; | |
| import Amplify, { Auth } from "aws-amplify"; | |
| import { ApolloProvider } from "react-apollo"; | |
| import { ApolloLink } from "apollo-link"; | |
| import { InMemoryCache } from "apollo-cache-inmemory"; | |
| import AWSAppSyncClient, { createAppSyncLink } from "aws-appsync"; | |
| import { withClientState } from "apollo-link-state"; |
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
| formatFilename = filename => { | |
| const date = moment().format("YYYYMMDD"); | |
| const randomString = Math.random() | |
| .toString(36) | |
| .substring(2, 7); | |
| const cleanFileName = filename.toLowerCase().replace(/[^a-z0-9]/g, "-"); | |
| const newFilename = `images/${date}-${randomString}-${cleanFileName}`; | |
| return newFilename.substring(0, 60); | |
| }; |
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 storageFactory from "./storageFactory"; | |
| export const localStore = storageFactory(localStorage); | |
| export const sessionStore = storageFactory(sessionStorage); |
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 { HttpLink } from 'apollo-link-http'; | |
| import { ApolloLink } from 'apollo-link'; | |
| import { InMemoryCache } from 'apollo-cache-inmemory'; | |
| import { onError } from 'apollo-link-error'; | |
| import { setContext } from 'apollo-link-context'; | |
| import { onLogout } from '../containers/App/actions'; | |
| import firebase from '../firebase'; |
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
| .storybook | |
| --webpack.config.js | |
| app | |
| --package.json | |
| ----assets | |
| ------fonts | |
| --------Lato-Regular.woff | |
| --------Lato-Regular.woff2 |
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 React, { PureComponent, Fragment } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { Text, View, Image } from 'react-native'; | |
| import s from './styles'; | |
| class AvatarWithFallback extends PureComponent { | |
| getFirstCharFromString = string => string.substring(0, 1).toUpperCase(); | |
| render() { |
NewerOlder