Skip to content

Instantly share code, notes, and snippets.

View halivert's full-sized avatar
🦏
Rushing like a rhino

Halí V. halivert

🦏
Rushing like a rhino
View GitHub Profile
@halivert
halivert / hali.sh
Last active June 16, 2020 19:30
CentOS 8 Initial setup
#! /bin/sh
sudo dnf install nginx mariadb-server -y
sudo dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm
sudo dnf module reset php
sudo dnf module enable php:remi-7.4
sudo dnf install php-fpm php-mysqli -y
sudo systemctl start nginx mariadb
sudo systemctl enable nginx mariadb
@halivert
halivert / HSelect.vue
Last active November 16, 2019 07:47
Select for use with Vue.js
<template>
<div>
<select v-bind="$attrs" v-model="selectedId" v-on="selectListeners">
<option
v-if="$attrs.placeholder"
:value="placeholderId"
:disabled="!enablePlaceholder"
>
{{ $attrs.placeholder }}
</option>
@halivert
halivert / BField.vue
Last active November 16, 2019 07:46
Field to use with Bulma
<script>
export default {
name: "b-field",
inheritAttrs: false,
props: {
coverErrors: Boolean,
errors: {
type: Array,
default: function() {
return [];
@halivert
halivert / app.py
Created January 24, 2019 05:51
Flask minimal API
from flask import (Flask)
from flask_restplus import (Api)
import resources
app = Flask(__name__)
api = Api(app, prefix='/v1', catch_all_404s=True)
api.add_resource(resources.TasksList, '/tasks')
@halivert
halivert / exhibidores
Created November 25, 2018 18:35
Script that converts pdf to jpg and copy the pdf to an usb
#! /bin/zsh
setopt +o nomatch
RED='\033[0;31m'
NC='\033[0m'
PDFinDownloads=$(ls ~/Descargas/Exhibidores*.pdf -t 2>/dev/null | head -1)
mv $PDFinDownloads . 2>/dev/null
if [ $? -ne 0 ]; then
echo "${RED}There's no Exhibidor files in Descargas"
fi
@halivert
halivert / copyIcons.sh
Created September 21, 2018 06:25
Iconos para iOS
if [ $# -eq 0 ]
then
echo "No arguments"
exit
fi
for file in "$@"
do
fullFileName=$file
extension="${fullFileName##*.}"
@halivert
halivert / .vimrc
Last active January 5, 2018 05:00
Linux vimrc
set nocompatible
so ~/.vim/plugins.vim
set showcmd
set rnu
syntax on
let mapleader = ','
set path+=**