Skip to content

Instantly share code, notes, and snippets.

never stop coding

Phlegx Systems OG phlegx

never stop coding
View GitHub Profile
View DirectUpload.vue
<template lang='pug'>
div.drop-zone(:class='{dragging: isDragging }'
div(:class='{ hidden: uploadInProgress }' @click='openFileBrowser')
i {{label}}
input(type='file' :multiple='multiple' ref='input' style='display: none')
phlegx / Ubuntu 18.04
Created Dec 9, 2020 — forked from labbots/Ubuntu 18.04
Ubuntu 18.04 Manual partitioning setup with LUKS encryption and LVM -
View Ubuntu 18.04

Ubuntu 18.04 installation with LUKS and LVM

Installation Process

Pre-installation from live OS

This setup of Ubuntu with LUKS and LVM is tested on Ubuntu 18.04.

Boot Ubuntu from a Live OS and select the option to try Ubuntu without installing. Follow the steps I've outlined below. Let's assume you're installing to /dev/nvme0n1.

  1. Partition the drive with your tool of choice: I used gparted to set mine up.
View app-controllers-concerns-authenticable.rb
module Authenticable
extend ActiveSupport::Concern
# Filter to use with before_action
def authenticate_user
rescue JWT::DecodeError => e
render json: { error: e.message }, status: :unauthorized
POST /oauth/token HTTP/1.1
Content-Type: application/json

  "grant_type": "password",
  "client_id": "CLIENT_ID",
  "owner_type": "OWNER_TYPE",
  "username": "OWNER_EMAIL",
 "password": "OWNER_PASSWORD"
phlegx / array_validator.rb
Last active May 5, 2021 — forked from ssimeonov/array_validator.rb
Rails 6.1 array validator with indexed messages.
View array_validator.rb
# Syntax sugar
class ArrayValidator < EnumValidator