Skip to content

Instantly share code, notes, and snippets.

@starfeeling
starfeeling / outline-server-setup.md
Created September 18, 2022 07:02 — forked from hadisfr/outline-server-setup.md
How to setup an Outline VPN Server on Ubuntu 16.04

How to setup an Outline VPN Server on Ubuntu 16.04 Server

This guide will show you how to install Outline Server on an Ubuntu 16.04 Server and use Outline Manager.

Install Outline Manager

Outline Manager supports Windows, macOS and Linux.

Outline Manager for Windows

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@starfeeling
starfeeling / .eslintrc.json
Created February 23, 2018 01:47
eslint config
{
"parser": "babel-eslint",
"env": {
"es6": true,
"node": true
},
"extends": "airbnb-base",
"rules": {
"indent": [
"error",
function format(val, figure) {
return val < 10 * (figure - 1) ? `0${val}` : `${val}`;
}
function dateformat(dateObject) {
const date = dateObject || new Date();
const year = format(date.getFullYear(), 4);
const month = format(date.getMonth() + 1, 2);
const day = format(date.getDate(), 2);
@starfeeling
starfeeling / sequelize.js
Last active April 15, 2020 18:13
async sequelize transaction
const findUser = await models.Users.findOne({
where: {
ds_id: user.id
}
})
const transaction = await models.sequelize.transaction()
try {
// Create
await models.Users.create(data, transaction)
#/bin/bash
#Ask some info
echo -n "Enter ELK Server IP or FQDN: "
read eip
echo -n "Enter Admin Web Password: "
read adpwd
#Update System
sudo apt-get update
sudo apt-get upgrade -y
var minute = 1000 * 60;
var hour = minute * 60;
var day = hour * 24;
var halfamonth = day * 15;
var month = day * 30;
function getDateDiff(dateTimeStamp) {
var now = new Date().getTime();
var diffValue = now - dateTimeStamp;
if (diffValue < 0) {