Skip to content

Instantly share code, notes, and snippets.

View jazz009's full-sized avatar

Nicolas Tréguier jazz009

View GitHub Profile
@jazz009
jazz009 / Synology-Diskstation-Git.md
Created December 19, 2017 22:40 — forked from walkerjeffd/Synology-Diskstation-Git.md
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@jazz009
jazz009 / try-catch.js
Created November 7, 2016 10:53
JS - Try Catch
try {
throw "monException"; // génère une exception
}
catch (e) {
// les instructions utilisées pour gérer les
// exceptions
logErreurs(e); // on transfère l'objet de l'exception à une méthode
// gestionnaire
}
@jazz009
jazz009 / add-attribute.js
Created October 20, 2016 09:37
JS - Ajouter un attribut a un element
document.getElementsByTagName('head')[0].setAttribute("class","democlass");
@jazz009
jazz009 / add-content.js
Last active October 20, 2016 09:39
JS - Ajouter contenu dans div
document.getElementById("backButton").innerHTML="Etape précédente";

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods