Skip to content

Instantly share code, notes, and snippets.

Avatar

Kevin Smets kevin-smets

View GitHub Profile
@raftheunis87
raftheunis87 / hyperjs.md
Last active Nov 13, 2020
Hyper.js + Hyper.js Plugins + ZSH + Starship + Fira Code + Dark Theme - (macOS)
@raftheunis87
raftheunis87 / creating-a-self-signed-ssl-certificate.md
Created May 30, 2018
Creating a Self-Signed SSL Certificate
View creating-a-self-signed-ssl-certificate.md
  1. openssl genrsa -des3 -passout pass:<your_pass_key_here> -out server.pass.key 2048
  2. openssl rsa -passin pass:<your_pass_key_here> -in server.pass.key -out server.key
  3. openssl req -new -key server.key -out server.csr
  4. openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt
@raftheunis87
raftheunis87 / eslint-vscode-airbnb.md
Last active May 3, 2020
Setting up ESLint on VS Code with Airbnb JavaScript Style Guide
View eslint-vscode-airbnb.md
  1. cd coding-directory
  2. npm init -y
  3. npm install --save-dev --save-exact eslint eslint-config-airbnb-base eslint-plugin-import
  4. Create .eslintrc file with following content:
{
  "extends": "airbnb-base",
  "env": {
    "browser": true,
    "node": true
@walkerjeffd
walkerjeffd / Synology-Diskstation-Git.md
Last active Nov 28, 2020
Instructions for setting up git server on Synology Diskstation
View Synology-Diskstation-Git.md

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
@staltz
staltz / introrx.md
Last active Nov 29, 2020
The introduction to Reactive Programming you've been missing
View introrx.md
@eliotsykes
eliotsykes / ngFocusAndBlur.js
Created Apr 16, 2013
AngularJS ngFocus and ngBlur directives - one way to get them before they get released. Before using, consider re-naming ngFocus and ngBlur to something that doesn't invade the ng namespace, e.g. replace all 'ngFocus' and 'ngBlur' strings with 'ngcFocus' and 'ngcBlur' (where c = cats/custom).
View ngFocusAndBlur.js
app.directive('ngFocus', ['$parse', function($parse) {
return function(scope, element, attr) {
var fn = $parse(attr['ngFocus']);
element.bind('focus', function(event) {
scope.$apply(function() {
fn(scope, {$event:event});
});
});
}
}]);
@ancestral
ancestral / ASCII JS Keyboard Map
Created Jul 6, 2012
ASCII keyboard map for JavaScript keycodes (Mac)
View ASCII JS Keyboard Map
/*
* JavaScript Keyboard Map (Mac layout)
*
*
* esc—— F1——— F2——— F3——— F4——— F5——— F6——— F7——— F8——— F9——— F10—— F11—— F12—— F13—————+
* | 27 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | ??? |
* ` ——— 1———— 2———— 3———— 4———— 5———— 6———— 7———— 8———— 9———— 0———— - ——— = ——— delete——+
* | 192 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
* tab———— Q———— W———— E———— R———— T———— Y———— U———— I———— O———— P———— [ ——— ] ——— \ ————+
* | 9 | 81 | 87 | 69 | 82 | 84 | 89 | 85 | 73 | 79 | 80 | 219 | 221 | 220 |
You can’t perform that action at this time.