mongo >= 6
: init-mongo.js
+ MONGO_INITDB_DATABASE
in .env-mongo
mongo < 6
: init-mongo.sh
+ no MONGO_INITDB_DATABASE
in .env-mongo
.env
:
MONGO_USER=user
MONGO_PASSWORD=userpasswd
# ====================================================================================== | |
# Delete all github-workflow runs of a given workflow_id to cleanup the actions-section | |
# | |
# original gist: | |
# https://gist.github.com/zulhfreelancer/a32bee3d37ffb90c93e00bf4b7fe26cf | |
# | |
# Requirements | |
# * gh CLI: https://cli.github.com (make sure you are logged-in to the CLI) | |
# * jq CLI: https://stedolan.github.io/jq | |
# ====================================================================================== |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.function Validator(req, res) { | |
this.req = req; | |
this.res = res; | |
this.validators = []; | |
this.errors = []; | |
} | |
Validator.prototype.add = function(name, rules) { | |
this.validators.push({ | |
name: name, |
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
// HTML files: try the network first, then the cache. | |
// Other files: try the cache first, then the network. | |
// Both: cache a fresh version if possible. | |
// (beware: the cache will grow and grow; there's no cleanup) | |
const cacheName = 'files'; |
/* https://leahayes.wordpress.com/2011/08/28/documenting-javascript-with-jsdoc3/ | |
Namespaces can still be documented when a more abstract mechanism is used. @lends allows members to be added to an existing namespace: | |
*/ | |
/** | |
* Root namespace | |
* @namespace root | |
*/ | |
$namespace('root', /** @lends root **/ { | |
/** |
Last updated March 13, 2024
This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.
Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.
<?php | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Headers: Authorization'); | |
if(isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/plain') !== false) { | |
$format = 'text'; | |
} else { | |
header('Content-Type: application/json'); | |
$format = 'json'; | |
} |
'use strict'; | |
const fractal = require('@frctl/fractal'); | |
//.... other config items | |
fractal.set('plugins.web.theme', 'example-theme'); |
var sys = require('sys') | |
var exec = require('child_process').exec; | |
function puts(error, stdout, stderr) { sys.puts(stdout) } | |
// pass in your command line arguments here – this one uses the default local config | |
exec("converjon --config node_modules/converjon/config/development.yml", puts); |