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
| // ===== Configuration ===== | |
| const SUBREDDITS = ['Notion', 'notiontemplates', 'NotionGeeks']; | |
| const USER_AGENT = 'script:nac-lead-digest:v1.0 (by /u/YOUR_REDDIT_USERNAME)'; | |
| const CLAUDE_MODEL = 'claude-sonnet-4-6'; | |
| const MAX_POSTS_PER_SUB = 100; // per run; plenty for a daily cadence | |
| const FIRST_RUN_LOOKBACK_HOURS = 24; | |
| const PROPS = PropertiesService.getScriptProperties(); | |
| function getRedditToken_() { |
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": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "Launch Next.js", | |
| "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/next", | |
| "runtimeArgs": ["dev"], | |
| "console": "integratedTerminal", |
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 corsOptions = { | |
| credentials: true, | |
| }; | |
| app.use(cors(corsOptions)); |
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
| app.use(ratelimit({ | |
| db, | |
| duration: 60000, | |
| max: 100, | |
| })); |
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 passport = require('koa-passport'); | |
| app.use(passport.initialize()); | |
| app.use(passport.session()); |
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
| app.use( | |
| session( | |
| { | |
| store: redisStore(), | |
| }, | |
| app, | |
| ), | |
| ); |
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, { Component } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { withRouter } from 'react-router'; | |
| import { connect } from 'react-redux'; | |
| import { NavLink } from 'react-router-dom'; | |
| import get from 'lodash/get'; | |
| import ProfilePlaceholder from 'assets/img/profile_placeholder.png'; | |
| import { isValidURL } from 'utils/utils'; | |
| import { logout, getProfile } from 'actions/access.actions'; | |
| import toggleLogin from 'actions/modals.actions'; |
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 from 'react'; | |
| import { Switch, Route } from 'react-router-dom'; | |
| import Cookies from 'js-cookie'; | |
| import { Redirect } from 'react-router'; | |
| import { AsyncHomeView, AsyncAboutView } from 'asyncViews'; | |
| export default function Routes() { | |
| return ( | |
| <Switch> |
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 from 'react'; | |
| import Loadable from 'react-loadable'; | |
| const Loading = () => ( | |
| <div /> | |
| ); | |
| export const AsyncAboutView = Loadable({ | |
| loader: () => import('about/AboutView'), | |
| loading: () => <Loading />, |
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 axios from 'axios'; | |
| import { API_ADDRESS } from 'config'; | |
| export function get(path, params) { | |
| const url = `${API_ADDRESS}${path}`; | |
| return axios({ | |
| method: 'get', | |
| url, | |
| params, |
NewerOlder