Create a .npmrc
file for your project like this:
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
Then find your token inside the ~/.npmrc
file in your home folder and set it as an NPM_TOKEN environment variable through netlify's admin UI.
// i like trpc. i like autocomplete. i like vercel/serverless. | |
// netlify acquired quirrel. | |
// theo would shill for a type safe option. | |
// there's a gap for a type-safe scheduling/cron/queuing/realtime and i want to fill it. | |
// also, quirrel has weird syntax for | |
// framing: typescript-first bindings for what you would typically use redis for | |
const appRouter = createRouter(); |
https://jennamolby.com/how-to-use-cookies-to-capture-url-parameters/ | |
let YOUR_DOMAIN = "YOUR_DOMAIN.TLD" // ex: scrapingbee.com | |
function getParameterByName(name) { | |
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); | |
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), | |
results = regex.exec(location.search); | |
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); | |
} |
import React from 'react'; | |
import { BLOCKS } from '@contentful/rich-text-types'; | |
import { documentToHtmlString } from './lib'; | |
import BlogPostBlockquoteEmoji, { | |
contentfulId as BLOCKQUOTE_EMOJI, | |
} from '../BlogPostBlockquoteEmoji'; | |
import BlogPostCaption, { contentfulId as CAPTION } from '../BlogPostCaption'; | |
import BlogPostColumns, { contentfulId as COLUMNS } from '../BlogPostColumns'; | |
import BlogPostImage from '../BlogPostImage'; |
export function* main() { | |
const { payload } = yield take(SOME_START_SIGNAL); | |
const watcherInstance = yield fork(updateResource, payload); | |
// cancel task instance on location change | |
yield take(LOCATION_CHANGE); | |
yield cancel(watcherInstance); | |
} | |
function* updateResource(id) { |
--- | |
- name: sync uploads and db from staging to local | |
hosts: my_staging_host | |
remote_user: "{{ web_user }}" | |
pre_tasks: | |
- name: Ensure site is valid | |
connection: local | |
fail: | |
msg: "Site `{{ site | default('') }}` is not valid. Available sites to sync: {{ wordpress_sites.keys() | join(', ') }}" |
#!/bin/sh | |
# This checks for .only remaining in js mocha test files and prevent | |
# commiting if any. | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object |