This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
so ~/.vim/plugins.vim | |
set showcmd | |
set rnu | |
syntax on | |
let mapleader = ',' | |
set path+=** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $# -eq 0 ] | |
then | |
echo "No arguments" | |
exit | |
fi | |
for file in "$@" | |
do | |
fullFileName=$file | |
extension="${fullFileName##*.}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
export default { | |
name: "b-field", | |
inheritAttrs: false, | |
props: { | |
coverErrors: Boolean, | |
errors: { | |
type: Array, | |
default: function() { | |
return []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<select v-bind="$attrs" v-model="selectedId" v-on="selectListeners"> | |
<option | |
v-if="$attrs.placeholder" | |
:value="placeholderId" | |
:disabled="!enablePlaceholder" | |
> | |
{{ $attrs.placeholder }} | |
</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
char *intToBin(int num) { | |
int bits = (num == 0); | |
int cp = num; | |
for (cp = num; cp > 0; cp >>= 1) bits++; | |
char *result = (char *)malloc(bits * sizeof(char)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXEC="./$1" | |
function test() { | |
if [ "$1" $2 "$3" ]; then | |
echo -e "\e[32mPASS\e[0m" | |
else | |
echo -e "\e[31mNOT PASS - $1 $4 $3 \e[0m" | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const splitIn = (elements, groups) => { | |
return elements.reduce((result, val, _, elements) => { | |
let lastItem = result[result.length - 1]; | |
if (lastItem.length === Math.ceil(elements.length / groups)) result.push([val]); | |
else lastItem.push(val); | |
return result; | |
}, [[]]); | |
} |
OlderNewer