Skip to content

Instantly share code, notes, and snippets.

View Ephigenia's full-sized avatar
🕊️
I may be slow to respond.

Marcel Eichner Ephigenia

🕊️
I may be slow to respond.
View GitHub Profile
@latark
latark / index.js
Last active June 24, 2023 10:39
QR with rounded corners and logo
import QRCode from 'qrcode';
import { qrRender } from './qrRender';
function QR() {
const qrData = '12312312312';
const options = {
color: 'colored',
logo: 'fillstuff',
};
const qrSvg = qrRender(QRCode.create(qrData, { errorCorrectionLevel: 'Q' }), options);
Method Relationship Parameter Returns Side effects / notes
cat.addOwner() M:M owner {}, or ownerId created join table row
cat.addOwners() M:M array of owner {} or ownerId, can be a combination array of created join table rows
cat.countOwners() M:M none int
cat.createOwner() 1:1, 1:M, M:M new owner {} (what you could also pass into Owner.create() ) created owner object cat instance will have updated ownerId
cat.getOwner() 1:1, 1:M none owner object (if exists), or null
cat.getOwners() M:M none array of owner object(s)
cat.hasOwner() M:M owner {}, or ownerId boolean
cat.hasOwners() M:M array of owner {} or ownerId, can be a combination boolean returns true only if ALL owners own this cat
cat.removeOwner() M:M owner {}, or ownerId int number of owners removed
@plentz
plentz / nginx.conf
Last active November 27, 2025 12:39
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@tj
tj / deploy.conf
Created May 24, 2011 22:43
start of deployment script
key /path/to/whatever.pem
user deployer-of-doom
addr n.n.n.n
repo git@github.com:visionmedia/express.git
path /path/to/www/whatever
branch origin/master
command /path/to/www/whatever/restart