Skip to content

Instantly share code, notes, and snippets.

View joshmenden's full-sized avatar

Josh Menden joshmenden

  • Pageport
  • Lehi UT
View GitHub Profile
// DISCLAIMER: This script automates actions on Facebook which may violate their Terms of Service.
// Use at your own risk. Aggressive use may result in temporary or permanent account restrictions.
// This is provided for educational purposes only.
// Facebook makes it very difficult to bulk remove friends. This should help.
//
// The goal here was not to completely automate this process, but to automate
// like 85% of it so it would take minutes and not hours with a little bit of hand-holding.
//
// To get this to work:
n2h --status-property="Writing Progress" --status="Ready to Publish" --title="20 Things I Love"
// copy & fill out secrets.yml
cp secrets-example.yml secrets.yml
vim secrets.yml
n2h --status-property="Writing Progress" --status="Ready to Publish" --title="20 Things I Love"
// copy & fill out secrets.yml
cp secrets-example.yml secrets.yml
vim secrets.yml
n2h --status-property="Writing Progress" --status="Ready to Publish" --title="20 Things I Love"
// copy & fill out secrets.yml
cp secrets-example.yml secrets.yml
vim secrets.yml
async function getHeaders() {
const headers = {}
const jwt = // whatever logic you need to fetch your JWT, possible from pinia etc
if (jwt) {
headers['Authorization'] = `Bearer ${jwt}`
}
headers['Content-Type'] = 'application/json'
return headers
import { provide, createApp, h } from 'vue'
import { ApolloClients } from '@vue/apollo-composable'
import { UseApolloClients } from './src/util/useApolloClients.js'
import App from './App.vue'
// keep your URLs as env variables for easy dev/prod switching
const {
VITE_GQL_URL_1: URL1,
VITE_GQL_URL_2: URL2
<script setup>
import { ref } from 'vue'
import gql from 'graphql-tag'
const MY_MUTATION = gql`
mutation MyAwesomeMutation {
// something awesome
}
`