vim.g.base46_cache = vim.fn.stdpath('data') .. '/base46_cache/'
- Make sure to read nvconfig to know default options
lua/chadrc.lua
file must return a table which follows the structure of nvconfig.
---@type ChadrcConfig
local M = {}
vim.g.base46_cache = vim.fn.stdpath('data') .. '/base46_cache/'
lua/chadrc.lua
file must return a table which follows the structure of nvconfig.---@type ChadrcConfig
local M = {}
This is an up-to-date guide on running Chromium in Vercel serverless functions in 2022. What you will read below is the result of two days of research, debugging, 100+ failed deployments, and a little bit of stress.
Use chrome-aws-lambda that comes with Chromium pre-configured to run in serverless, and puppeteer-core
due to the smaller size of Chromium distributive.
This gist was partially inspired by this blog about Next.js Vercel CI with GitHub actions.
An easy way to deploy and host websites for free is to use GitHub pages. If you've deployed a Next.js project to GitHub pages, you may have used a GitHub action similar to this in the past to automatically redeploy the site when a new commit is pushed:
# gh-pages-merge.yml
name: Deploy to gh-pages on merge
on:
push:
This is a simple Tailwind plugin to expose all of Tailwind's colors, including any custom ones, as custom css properties on the :root
element.
There are a couple of main reasons this is helpful:
See the Tailwind Plugins for more info on plugins.
// A simple and raw example on how to scrape company employees data. | |
// this script will save the ouput in a .json file. | |
// the script needs your cookies to login. | |
// For Educational Purposes Only :) | |
const puppeteer = require('puppeteer'); | |
const fs = require('fs'); | |
const cookies = require('./cookies.json'); | |
const API_ENDPOINT = "https://www.linkedin.com/voyager/api/search/hits?" |
import React from 'react'; | |
import {ScrollView, Text} from 'react-native'; | |
const isCloseToBottom = ({layoutMeasurement, contentOffset, contentSize}) => { | |
const paddingToBottom = 20; | |
return layoutMeasurement.height + contentOffset.y >= | |
contentSize.height - paddingToBottom; | |
}; | |
const MyCoolScrollViewComponent = ({enableSomeButton}) => ( |
[Settings] | |
ID = "Your_Site_ID" | |
# Settings in the [build] context are global and are applied to all contexts unless otherwise overridden by more specific contexts. | |
[build] | |
# This is the directory to change to before starting a build. | |
base = "project/" | |
# NOTE: This is where we will look for package.json/.nvmrc/etc, not root. | |
# This is the directory that you are publishing from (relative to root of your repo) |
I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:
Set my args as follows:
const run = (async () => {
const args = [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-infobars',
import React from 'react'; | |
const ConditionalWrap = ({condition, wrap, children}) => condition ? wrap(children) : children; | |
const Header = ({shouldLinkToHome}) => ( | |
<div> | |
<ConditionalWrap | |
condition={shouldLinkToHome} | |
wrap={children => <a href="/">{children}</a>} | |
> |
/** | |
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
* It was requested to be introduced at as part of the jsonwebtoken library, | |
* since we feel it does not add too much value but it will add code to mantain | |
* we won't include it. | |
* | |
* I create this gist just to help those who want to auto-refresh JWTs. | |
*/ | |
const jwt = require('jsonwebtoken'); |