Skip to content

Instantly share code, notes, and snippets.

View heygambo's full-sized avatar

Christian Gambardella heygambo

View GitHub Profile
@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.
{"version":1,"resource":"file:///Users/gambo/code/fanmio/tacommerce/serverless/services/orders/src/data/updateFulfillmentsImport.ts","entries":[{"id":"9Ncs.ts","timestamp":1656504326866}]}
  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 / 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
> firebase-mock@2.3.0 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'...
@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 / BitcasaFailedUploads-20131024T010200
Created October 24, 2013 05:45
Bitcasa still doesn't upload my files. They have been cached about 2 month now without any error notification. After I've uploaded some MB of data the Bitcasa client claims that it needs to upload 20gb of data. this is my iphoto library which should have been uploaded 2 month ago. What If I decided to delete my iPhoto Library from my Harddrive? …
This file has been truncated, but you can view the full file.
/Volumes/Bitcasa Infinite Drive/Pictures/Pictures/iPhoto Library/Masters/2009/Zoo/P1000324.JPG
/Volumes/Bitcasa Infinite Drive/Pictures/Pictures/iPhoto Library/Masters/2011/03/02/20110302-181927/188X5745.JPG
/Volumes/Bitcasa Infinite Drive/Pictures/Pictures/iPhoto Library/Masters/2012/01/12/20120112-163037/IMG_0434.JPG
/Volumes/Bitcasa Infinite Drive/Pictures/Pictures/iPhoto Library/Masters/2007/Marias Geburtstag/IMG_4479.JPG
/Volumes/Bitcasa Infinite Drive/Pictures/Pictures/iPhoto Library/Masters/2008/Automatenfotos/Bodo, Jasper, Monika, Bodo.jpg
/Volumes/Bitcasa Infinite Drive/Pictures/Pictures/iPhoto Library/Masters/2007/Fussballturnier/IMG_0030.JPG
/Volumes/Bitcasa Infinite Drive/Pictures/Pictures/iPhoto Library/Masters/2010/Victor/IMG_9030.JPG
/Volumes/Bitcasa Infinite Drive/Pictures/Pictures/iPhoto Library/Masters/2010/Fotos Ninos Einschulung/IMG_0260.JPG
/Volumes/Bitcasa Infinite Drive/Pictures/Pictures/iPhoto Library/Masters/2012/01/27/20120127-141939/P1000671.JPG
/Volumes/Bitcasa Infinite Drive/Pictu