Skip to content

Instantly share code, notes, and snippets.

View mqtik's full-sized avatar
🙃

Matías Fort mqtik

🙃
View GitHub Profile
@mqtik
mqtik / FIRST.md
Last active May 12, 2021 02:34
Set up server with Docker and CouchDB

Installing Docker

Let's install Docker and set it to be from their repository instead of Ubuntu (which comes by default). Also, let's disable root mode in order to run Docker.

sudo apt install apt-transport-https ca-certificates curl software-properties-common && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic test" && sudo apt update && sudo apt install docker-ce

To save money and not run each instance of CouchDB by servers, let's create instances for each project. And define and admin & password (since CouchDB doesn't)

@mqtik
mqtik / wildcard-ssl-certificate.md
Created October 11, 2018 19:28 — forked from talyguryn/wildcard-ssl-certificate.md
How to get a wildcard ssl certificate and set up Nginx.

How to get and install a wildcard SSL certificate

In this guide you can find how to resolve the following issues.

Feel free to ask any questions in the comments section below.

@mqtik
mqtik / CSS
Created October 6, 2018 03:50
Animations faded on NG-IF
<style>
.animate-if {
background:white;
border:1px solid black;
padding:10px;
}
.animate-if.ng-enter, .animate-if.ng-leave {
transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
}
@mqtik
mqtik / function.js
Created September 24, 2018 22:06
Prototype String Replace
String.prototype.deleteWord = function (searchTerm) {
var str = this;
var n = str.search(searchTerm);
while (str.search(searchTerm) > -1) {
n = str.search(searchTerm);
str = str.substring(0, n) + str.substring(n + searchTerm.length, str.length);
}
return str;
}
@mqtik
mqtik / notifications.ts
Created September 13, 2018 14:08 — forked from davorpeic/notifications.ts
OneSignal service
import { Injectable } from "@angular/core";
import * as application from 'application';
let TnsOneSignal = require('nativescript-onesignal').TnsOneSignal;
@Injectable()
export class NotificationService {
constructor() {}