Skip to content

Instantly share code, notes, and snippets.

View sadortun's full-sized avatar
🚑
Working 24/7 👍

Samuel Denis-D'Ortun sadortun

🚑
Working 24/7 👍
View GitHub Profile
@bushev
bushev / script.js
Created March 19, 2020 19:50
Remove duplicated files from Moments (Synology NAS)
// Very fast-coded deduplication utility. It parses standard "Storage Analyzer" report and moves duplicated files to a separate folder.
// Requires "npm i csv-parse 'move-file"
'use strict';
const path = require('path')
const fs = require('fs')
const parse = require('csv-parse/lib/sync')
const moveFile = require('move-file');
@paulomcnally
paulomcnally / index.js
Last active October 13, 2018 15:23 — forked from codediodeio/index.js
Firebase Cloud Functions image thumbnail generator using Sharp for 4x faster resizing
const functions = require('firebase-functions');
const gcs = require('@google-cloud/storage')();
const sharp = require('sharp')
const _ = require('lodash');
const path = require('path');
const os = require('os');
exports.generateThumbnail = functions.storage.object('uploads/{imageId}').onFinalize(event => {
const object = event.data; // The Storage object.
From -> https://forum.synology.com/enu/viewtopic.php?t=98124
1. Go to your console ( https://console.developers.google.com/ ) and create a project.
2. Create a bucket in Storage -> Cloud Storage -> Storage Browser
3. Go to Storage -> Cloud Storage -> Storage Access and enable Interoperability
4. Generate access key
5. Now go to DSM 5.2 and install Hyper Backup if you havent already.
6. Pick S3 storage
7. The input next to the label "S3 Server" is both text input and drop-down. This is where you write "storage.googleapis.com"
8. Enter key and secret.
@stursby
stursby / README.md
Last active May 13, 2022 07:41
Vue + Firebase + Auth Demo

Vue + Firebase + Auth Demo

A simple App using Vue.js & Firebase with Auth.

See the DEMO.

@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active April 19, 2024 18:20
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."git@github.com:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
@odan
odan / xampp_php7_xdebug.md
Last active April 17, 2024 05:36
Installing Xdebug for XAMPP
@ehazlett
ehazlett / gist:9241844
Last active February 13, 2018 15:47
OpenShift Origin AWS

OpenShift Origin in AWS

This describes deploying and running OpenShift Origin in Amazon Web Services.

This is based upon the code and installer on 2014-02-26 so YMMV.

We will be using a VPC for deployment in us-east-1 and Route53 for DNS. I will leave the VPC setup as an exercise for the reader.

Prerequisites

  • AWS Account
  • VPC
// Simple spreadsheet, with first sheet containing form submission repsonses
// when the form is submitted:
// 1) grab the latest response,
// 2) post it to a third party service via an HTTP POST
function testWebhook() {
var ss = SpreadsheetApp.openById(SPREADSHEET_ID);
var form=ss.getSheets()[0];
var lr=form.getLastRow();
var el=form.getRange(lr,2,1,1).getValue();
var t=el;