Skip to content

Instantly share code, notes, and snippets.

View naillizard's full-sized avatar
🏠
Working from home

naillizard naillizard

🏠
Working from home
View GitHub Profile
@naillizard
naillizard / .bash_aliases
Last active September 29, 2021 11:54
.bash_aliases
# shortcuts
alias c="clear"
alias ..="cd .."
alias ...="cd ../.."
# git
alias gst="git status"
# artisan
alias art="php artisan"
@naillizard
naillizard / AppRadioGroup.vue
Last active June 7, 2021 23:47
Tailwind headless ui radio group component
<template>
<RadioGroup v-model="selected">
<RadioGroupLabel v-if="label" class="block font-medium text-sm text-gray-700">{{ label }}</RadioGroupLabel>
<div class="space-y-2 mt-1">
<RadioGroupOption
v-for="option in options"
:key="option.name"
v-slot="{ active, checked }"
:value="option"
as="template"
set nocompatible
set t_Co=256
syntax on
set linespace=15
set showmode
set nowrap
set tabstop=4
set smarttab
set tags=tags
@naillizard
naillizard / register.json.js
Created September 10, 2019 20:52
Sapper recaptcha siteverify
import axios from 'axios'
export async function post(req, res, next) {
res.setHeader('Content-Type', 'application/json')
let response;
const secret = '<YOUR-SECRET-KEY>'
const { captchaToken } = req.body
const captchaResponse = await axios.post(`https://www.google.com/recaptcha/api/siteverify?secret=${secret}&response=${captchaToken}`)
@naillizard
naillizard / personal_windows10x_bostarter.txt
Last active July 23, 2018 02:32
[windows_machine_boxstarter] Installs some default software on a windows machine #tags: boxstarter
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
Disable-InternetExplorerESC
Disable-GameBarTips
Disable-BingSearch
cinst Microsoft-Hyper-V-All -source windowsFeatures
# Better Terminal
@naillizard
naillizard / sslkeygen.sh
Created March 6, 2017 02:23
[openssl] Self-Signed certificates #tags: x509, ssl, tls, openssl
# generate encryption key .pem or .key
openssl genrsa 2048 > $1.key
# generate selfsigned certificate .crt optionally
openssl req -x509 -new -nodes -days $2 -key $1.key -subj "/CN=$1" > $1.pem
openssl genrsa 2048 > $1_device.key
# generate certificate sign request .pem or .csr
openssl req -new -key $1_device.key -subj "/CN=$1" > $1_device.csr
@naillizard
naillizard / mySQLSecure.sh
Last active January 15, 2018 20:04
Automate mysql secure installation for Red Hat Enterprise Linux (RHEL) compatible distributions
#!/bin/bash
#
# Automate mysql secure installation for Red Hat Enterprise Linux (RHEL) compatible distributions
#
# - Change a password for root accounts (CLI option)
# - Remove root account access from hosts other than localhost. (default behavior)
# - Remove anonymous-user accounts. (default behavior)
# - Remove the test database and privileges that permit anyone to
# access databases with names that start with test_. (default behavior)
#