Skip to content

Instantly share code, notes, and snippets.

View heygambo's full-sized avatar

Christian Gambardella heygambo

View GitHub Profile
  1. SSH into your Synology
  2. Find the corresponding folders in the filesystem.

=> Private Photo Station folder: /volume1/homes/USER/photo => Moments folder: /volume1/homes/USER/Drive/Moments

  1. Mount Photo Station folder into Moments using

Command

@heygambo
heygambo / AWS_MAGENTO_README.md
Last active May 28, 2020 10:00
Error when using the AWS magento cloudformation script at https://docs.aws.amazon.com/quickstart/latest/magento/welcome.html

Cloudformation settings

The Cloudformation ran with those settings:

https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/quickcreate?templateUrl=https%3A%2F%2Faws-quickstart.s3.amazonaws.com%2Fquickstart-magento%2Ftemplates%2Fmagento-master.template&stackName=Magento&param_AccessCIDR=0.0.0.0%2F0&param_AdminEmail=christian%40fanmio.com&param_AdminFirstName=admin&param_AdminLastName=user&param_AdminUserName=admin&param_AvailabilityZones%5B%5D=us-east-1a&param_AvailabilityZones%5B%5D=us-east-1b&param_BastionAMIOS=Ubuntu-Server-18.04-LTS-HVM&param_BastionInstanceType=t2.small&param_DBAutoMinorVersionUpgrade=true&param_DBBackupRetentionPeriod=7&param_DBEngineType=Amazon%20Aurora&param_DBInstanceClass=db.r4.large&param_DBMasterUsername=admin&param_DBMultiAZ=true&param_DBName=magento&param_DNSName=&param_ElastiCacheAutomaticFailover=true&param_ElastiCacheNodeType=cache.m4.large&param_ElastiCacheNodes=2&param_KeyPairName=2020-gambo&param_MagentoCurrency=USD&param_MagentoLanguage=en_US&pa
@heygambo
heygambo / lwp-cloudflare-dyndns.sh
Created March 17, 2020 05:21
Cloudflare as Dynamic DNS (revised)
#!/bin/bash
# Cloudflare as Dynamic DNS
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/
# Fixed and documented version by Christian Gambardella (https://gambo.io)
# 1. Create a cloudflare account
# 2. Create a zone and a record with any ip address.
# It will be updated by the script.
@heygambo
heygambo / firebase-mock-list-collections-specs.log
Created January 15, 2020 10:02
firebase-mock-list-collections-specs.log
(feature/add-list-collections) firebase-mock ツ npm run test
> [email protected] test /Users/gambo/code/github/firebase-mock
> gulp lint && gulp test
[11:00:45] Using gulpfile ~/code/github/firebase-mock/gulpfile.js
[11:00:45] Starting 'lint'...
[11:00:46] Finished 'lint' after 1.15 s
[11:00:49] Using gulpfile ~/code/github/firebase-mock/gulpfile.js
[11:00:49] Starting 'test'...
{"version":1,"resource":"file:///Users/gambo/code/fanmio/tacommerce/serverless/services/orders/src/data/updateFulfillmentsImport.ts","entries":[{"id":"9Ncs.ts","timestamp":1656504326866}]}
@heygambo
heygambo / onetime.ts
Last active February 9, 2019 12:34
Assure the firebase function is only being processed once if invoked multiple times.
import { CollectionReference } from "@google-cloud/firestore"
const wait = (seconds: number): Promise<void> => new Promise(resolve => setTimeout(resolve, seconds * 1000))
export interface CreateThisOneTimeOptions {
collectionRef: CollectionReference,
}
export interface ThisOneTimeOptions {
docKey: string,
@heygambo
heygambo / dev.env.js
Created October 27, 2016 20:06
Environment variables for vue webpack frontends
// src/config/dev.env.js
export default {
GOOGLE_MAPS_API_KEY: 'THE KEY'
}
@heygambo
heygambo / logger.js
Created October 12, 2016 12:11
Vuex 1.0.0 logger.js
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var asyncGenerator = function () {
function AwaitValue(value) {
var VueFactory = {
components: {},
registerComponent: function(name, component) {
this.components[name] = component;
},
getComponent: function(name) {
return this.components[name];
},
vue: function(name, options) {
if (typeof options !== "object") {
@heygambo
heygambo / Function.bind.polyfill.js
Created October 26, 2015 20:21 — forked from edeustace/Function.bind.polyfill.js
A polyfill for function.bind for IE8
if (!Function.prototype.bind) {
Function.prototype.bind = function (oThis) {
if (typeof this !== "function") {
// closest thing possible to the ECMAScript 5 internal IsCallable function
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
}
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
fNOP = function () {},