Skip to content

Instantly share code, notes, and snippets.

View frufin's full-sized avatar
🍏

Frederic Rufin frufin

🍏
View GitHub Profile
@waaronking
waaronking / index.vue
Created June 23, 2020 10:44
TipTap Align-Text Example
<!-- This file is mainly pseudo code with parts copied from a working project to illustrate how tiptap-aligntext.plugin.js can be implemented into your project -->
<template>
<div>
<editor-menu-bar :editor="editor" v-slot="{ commands }">
<div class="menubar">
<i class="fas fa-align-left" :class="{ 'is-active': editor.activeMarkAttrs.aligntext.align === 'left' }" @click="commands.aligntext({ align: 'left' })"></i>
<i class="fas fa-align-center" :class="{ 'is-active': editor.activeMarkAttrs.aligntext.align === 'center' }" @click="commands.aligntext({ align: 'center' })"></i>
<i class="fas fa-align-right" :class="{ 'is-active': editor.activeMarkAttrs.aligntext.align === 'right' }" @click="commands.aligntext({ align: 'right' })"></i>
<i class="fas fa-align-justify" :class="{ 'is-active': editor.activeMarkAttrs.aligntext.align === 'justify' }" @click="commands.aligntext({ align: 'justify' })"></i>
@jonathanpglick
jonathanpglick / dabblet.css
Created January 17, 2014 19:02
Vertical fill remaining area with flexbox.
/**
* Vertical fill remaining area with flexbox.
*/
html, body {
margin: 0;
padding: 0;
height: 100%;
}
body {
@mateusg
mateusg / dissite.sh
Created August 3, 2012 21:29
Script for disabling a site, just like a2dissite, from Apache2
#! /bin/bash
# Disables a site, just like a2dissite command, from Apache2.
SITES_AVAILABLE_CONFIG_DIR="/opt/nginx/sites-available";
SITES_ENABLED_CONFIG_DIR="/opt/nginx/sites-enabled";
if [ $1 ]; then
if [ ! -f "${SITES_ENABLED_CONFIG_DIR}/${1}" ]; then
echo "Site ${1} was already disabled!"
elif [ ! -w $SITES_ENABLED_CONFIG_DIR ]; then