This file contains 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, { Component } from 'react' | |
import { GoogleLogin, GoogleLogout } from 'react-google-login'; | |
const CLIENT_ID = '<your Client ID>'; | |
class GoogleBtn extends Component { | |
constructor(props) { | |
super(props); |
This file contains 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 logging | |
from boto3.session import Session | |
AWS_ACCESS_KEY_ID = 'your aws key ID' | |
AWS_SECRET_ACCESS_KEY = 'your aws secret access key' | |
AWS_REGION_NAME = 'your region name. e.g, us-east-1' | |
AWS_LOG_GROUP = 'MyLogGroup', # your log group | |
AWS_LOG_STREAM = 'Mystream', # your stream | |
AWS_LOGGER_NAME = 'watchtower-logger' # your logger |
This file contains 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 rest_framework.pagination import PageNumberPagination | |
from rest_framework.response import Response | |
DEFAULT_PAGE = 1 | |
DEFAULT_PAGE_SIZE = 10 | |
class CustomPagination(PageNumberPagination): | |
page = DEFAULT_PAGE | |
page_size = DEFAULT_PAGE_SIZE |
This file contains 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 LOCAL_FILE_REGEX_WINDOWS = new RegExp('^([A-Za-z]:[^\<\>\:\"\|\?\*]+)'); | |
const LOCAL_FILE_REGEX_MAC = new RegExp('^(file:\//\/)'); | |
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => { | |
if (!tabs[0]) { | |
return; | |
} | |
let url = tabs[0].url; |