Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.
/** @satisfies {import('json-schema-to-ts').JSONSchema} */ | |
const schema2 = { | |
type: 'object', | |
additionalProperties: false, | |
properties: { | |
input: { | |
type: 'object', | |
additionalProperties: false, | |
properties: { | |
x: { type: 'number' }, |
source "https://rubygems.org" | |
gem 'puma' | |
gem 'sinatra' |
A description of how to run an existing CouchApp on PouchDB in the browser using service workers - without any modifications to existing code being necessary! The best thing is that if service workers aren't available, the CouchApp will still run as normal: that is, online.
upstream myapp { | |
server unix:///myapp/tmp/puma.sock; | |
} | |
server { | |
listen 80; | |
server_name myapp.com; | |
# ~2 seconds is often enough for most folks to parse HTML/CSS and | |
# retrieve needed images/icons/frames, connections are cheap in |
This is a solution by https://github.com/coco98 and https://github.com/tirumaraiselvan from the Hasura team. I put it here because it was too long to copy paste it onto Discord :/
This is how we do metadata in Hasura instead of going through the migrations mechanism in v1. It's interesting that the Hasura team is following a similar approach https://youtu.be/ik3vd0Ju9sw?t=1636 with the next iteration of the metadata!
This process really helps us model our data and the relations way faster. In particular when it comes down to renaming things or removing many permissions at once.
I should've totally shared this earlier :/.
What we do is that we write our metadata in YAML files inside a metadata
folder and split them by types.
CHANGES=`git log origin/production..origin/master`; | |
if [ -z "$CHANGES" ]; then | |
echo "✅ Production is already in sync with master"; | |
exit; | |
fi; | |
echo "" | |
echo "" | |
echo "📝 This is what's on master that's could be released to production:" |
unset GREP_OPTIONS | |
# find content in javascript files inside a folder | |
# eg: findjs color src | |
function findjs { | |
find "${2:-.}" -name '*.js' -not -path '*node_modules*' -not -path '*dist*' -exec grep "$1" --color=auto {} \; -print | |
} | |
# find content in javascript files inside a folder and replace it with something else | |
# eg: findjsr red blue src |
let glob = require('fast-glob'); | |
let fs = require('fs').promises; | |
let path = require('path'); | |
let RELATIVE_IMPORT_ABOVE_FILE = /^import .+? '((\.\.\/)+)/; | |
let isRelativeImportAboveFile = line => RELATIVE_IMPORT_ABOVE_FILE.test(line); | |
let asAbsoluteImport = line => | |
line.replace(line.match(RELATIVE_IMPORT_ABOVE_FILE)[1], ''); | |
async function run() { |