Skip to content

Instantly share code, notes, and snippets.

@Agoreddah
Agoreddah / encrypter.js
Last active October 2, 2024 07:13
Laravel encrypt & decrypt in Node.js
// load variables
require('dotenv').config();
// load dependencies
const crypto = require('crypto');
'use strict';
const APP_KEY = process.env.APP_KEY;
@jmillerdesign
jmillerdesign / gist:9920243
Last active February 17, 2016 22:15
MySQL dump to backup to .gz
# .gz
mysqldump -h 'db.example.com' -u'username' -p'password' 'database' --single-transaction | gzip -c | cat > 'database_backup_2014-01-01.sql.gz'
# .sql
mysqldump -h 'db.example.com' -u'username' -p'password' 'database' --single-transaction > 'database_backup_2014-01-01.sql'
@miniplay
miniplay / mpJavascriptExternalDemo.php
Last active December 15, 2015 20:19
API loading for external games. Miniplay Connect DEMO.
<?php
/* NOTICE: For miniplay connect to work, your domain must be allowed by us, contact us to request access */
/* 1. Parameters decoding ============================================================================================ */
/* Only if your system configuration or language doesn't automatically decodes it */
foreach ($_GET as $key => $value) $_GET[$key] = urldecode($value);
/* 2. Parameters validation (mp_*) =================================================================================== */
/* External games doesn't receive neither parameters or signature, no validation needed */