Skip to content

Instantly share code, notes, and snippets.

@Moofx
Moofx / ubuntu-server-setup-16.04-LAMP.md
Created July 5, 2018 23:09 — forked from Otienoh/ubuntu-server-setup-16.04-LAMP.md
LAMP Server setup for Ubuntu 16.04 on Digital Ocean

Server setup for Ubuntu 16.04 on Digital Ocean

The setup installs the following software:

The setup installs the following software:

  • Apache
  • MySQL
  • PHP
  • Node
@Moofx
Moofx / shadow-dom.md
Created March 21, 2018 00:25 — forked from praveenpuglia/shadow-dom.md
Everything you need to know about Shadow DOM

I am moving this gist to a github repo so more people can contribute to it. Also, it makes it easier for me to version control.

Please go to - https://github.com/praveenpuglia/shadow-dom-in-depth for latest version of this document. Also, if you find the document useful, please shower your love, go ⭐️ it. :)

Shadow DOM

Heads Up! It's all about the V1 Spec.

In a nutshell, Shadow DOM enables local scoping for HTML & CSS.

@Moofx
Moofx / introrx.md
Created February 11, 2018 12:06 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@Moofx
Moofx / README.md
Created January 30, 2018 07:53 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@Moofx
Moofx / class_decorator.ts
Created January 22, 2018 05:49 — forked from remojansen/class_decorator.ts
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@Moofx
Moofx / letsencrypt_2017.md
Created December 24, 2017 19:39 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

@Moofx
Moofx / bling.js
Created November 4, 2017 20:13 — forked from paulirish/bling.js
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@Moofx
Moofx / flash-app.js
Created October 19, 2017 19:49 — forked from brianmacarthur/flash-app.js
Flash messaging in Express 4: express-flash vs. custom middleware in ejs, handlebars, or jade
var express = require('express');
var cookieParser = require('cookie-parser');
var session = require('express-session');
var flash = require('express-flash');
var handlebars = require('express-handlebars')
var app = express();
var sessionStore = new session.MemoryStore;
// View Engines
@Moofx
Moofx / git-deployment.md
Created October 10, 2017 13:09 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@Moofx
Moofx / production-web-server-setup-and-deployment-guide.md
Created June 25, 2017 02:41 — forked from journeymanavi/production-web-server-setup-and-deployment-guide.md
A runbook for setting up a Linux based secure, production web server, for serving static web content as well as deploying Node.js based web applications.