Skip to content

Instantly share code, notes, and snippets.

View mazedlx's full-sized avatar
😊
Awesome awesomeness

Christian Leo-Pernold mazedlx

😊
Awesome awesomeness
View GitHub Profile
set nocompatible "be iMproved
so ~/.vim/plugins.vim "Vundle Plugins
syntax enable "Syntax highlighting
set number "Line numbers
set backspace=indent,eol,start "backspace should behave like every other editor.
let mapleader= ',' "The default leader is \, but a comma is much better
set tabstop=4
set shiftwidth=4
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
@mazedlx
mazedlx / tailwindcss.blade.php
Created November 5, 2017 12:54
Tailwind CSS template for Laravel pagination
@if ($paginator->hasPages())
<div class="flex items-center">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<span class="rounded-l rounded-sm border border-brand-light px-3 py-2 cursor-not-allowed no-underline">&laquo;</span>
@else
<a
class="rounded-l rounded-sm border-t border-b border-l border-brand-light px-3 py-2 text-brand-dark hover:bg-brand-light no-underline"
href="{{ $paginator->previousPageUrl() }}"
rel="prev"
@mazedlx
mazedlx / how_to_install_oci8_on_ubuntu_17.10_and_PHP_7.1.md
Last active February 21, 2024 10:05
How to install OCI8 on Ubuntu 17.10 and PHP 7.1

How to install OCI8 on Ubuntu 17.10 and PHP 7.1

This guide refers to Instantclient Version 12.2.0.1.0

Install Oracle Instant Client and SDK

Step 1

Download the latest Oracle Instant Client and SDK from the Oracle website (Yeah, fuck you Oracle, you need to create an account to download the files).

http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

@mazedlx
mazedlx / AllDepartmentsSelect.vue
Created June 21, 2018 12:02
AllDepartmentsSelect.vue
<template>
<div class="form-group" :class="{ 'has-error': hasError }">
<label class="col-md-3 control-label">Abteilung</label>
<div class="col-md-6">
<select id="department_id" class="form-control" v-model="departmentId" @change="setDepartment">
<option v-for="department in departments" :value="department.id" v-text="department.department" :key="department.id"></option>
</select>
</div>
</div>
</template>
@mazedlx
mazedlx / AllDepartmentsSelect.spec.js
Created June 21, 2018 12:03
AllDepartmentsSelect.spec.js
import { mount } from "@vue/test-utils";
import Component from "../../components/Article/AllDepartmentsSelect.vue";
describe("AllDepartmentsSelect", () => {
let $wrapper;
beforeEach(() => {
$wrapper = mount(Component);
});
@mazedlx
mazedlx / laravel_exoscale_service_provider.md
Last active March 7, 2023 16:45
Laravel S3 ServiceProvider for Exoscale

How To Use Laravel with Exoscale Storage (AWS S3 compliant)

Make a new service provider

$ php artisan make:provider ExoscaleServiceProvider

Edit the provider to look like this

@mazedlx
mazedlx / gist:2a2b41ba358564a15351734cbb03e9d5
Created November 20, 2018 12:51
GoAccess command for mazedlx.net
zcat /var/log/nginx/access.log.*.gz | goaccess /var/log/nginx/access.log.1 \
/var/log/nginx/access.log \
--log-format=COMBINED \
-o /var/www/html/stats/index.html \
--ws-url=wss://stats.mazedlx.net:7890 \
--real-time-html \
--daemonize \
--ssl-cert=/etc/letsencrypt/live/mazedlx.net/fullchain.pem \
--ssl-key=/etc/letsencrypt/live/mazedlx.net/privkey.pem
@mazedlx
mazedlx / self_signed_certs_for_wsl.md
Last active January 21, 2019 16:55
Fucking SSL for fucking WSL development machine

Fucking self-signed certs for a fucking WSL development machine using fucking NGINX

Create a fucking CA

Create a fucking private key

$ openssl genrsa -des3 -out myCA.key 2048

Create a fucking root cert

# Remap prefix 'C-b' to 'C-a'
unbind C-b # remove bind for C-b
set-option -g prefix C-a
bind-key C-a send prefix
# Create Panes: window splitting
# Split vertically
unbind %
bind | split-window -h # Prefix | to create vertical split
# Split horizontally