Skip to content

Instantly share code, notes, and snippets.

@warlock
warlock / config.yml
Last active January 16, 2024 10:44
fnproject docker-compose and remote deployment
# ~/.fn/config.yaml
cli-version: 0.5.96
current-context: default
api-url: http://192.168.0.69:8080
provider: default
registry: http://192.168.0.69:5000
@warlock
warlock / gist:0ccd98d9cdd36a7091086c47ddb8af17
Last active December 20, 2022 13:40
Instalacio de docker a ubuntu
sudo apt install docker.io
sudo groupadd docker
sudo usermod -aG docker $USER
sudo systemctl enable docker
sudo systemctl disable docker
@warlock
warlock / getText.js
Created April 16, 2020 06:22
Get innerText without another child nodes
[].reduce.call(PARENT_NODE.childNodes, (a, b) => a + (b.nodeType === 3 ? b.textContent : ''), '')
@warlock
warlock / directives.graphql
Last active December 20, 2022 13:40
GraphQL Apollo Schema Directives
directive @isAuthenticated on FIELD | FIELD_DEFINITION
directive @isAdmin on FIELD | FIELD_DEFINITION
@warlock
warlock / puppeter_install.sh
Created October 23, 2019 09:18
Puppeter Debian Dependences
apt install -y gconf-service \
libasound2 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libc6 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libexpat1 \
libfontconfig1 \
@warlock
warlock / app.json
Created June 20, 2019 13:25
App.json Expo Example Android And iOS permission examples
{
"expo": {
"name": "appname",
"slug": "appslug",
"privacy": "unlisted",
"sdkVersion": "32.0.0",
"platforms": [ "ios", "android" ],
"version": "2.0.36",
"orientation": "portrait",
"icon": "./assets/icon.png",
@warlock
warlock / restore_mongo.sh
Created June 20, 2019 10:39
Restore mongo collection
mongorestore --username USER --password PASSWD --db DATABASE --collection COLLECTION COLLECTION_FILE.bson
@warlock
warlock / Login.vue
Last active December 4, 2024 07:39
Vuex and Vue.js Session Control Example
<template>
<div id="login">
<div v-if="getToken === ''">
<input type="text" v-model="user">
<br>
<input type="password" v-model="password">
<br>
<button @click="handleLogin">LOGIN</button>
</div>
<div v-else>
@warlock
warlock / mount_virtualdisk.md
Last active June 20, 2019 10:33
OVH Mount Virtual Disk

MYSQL FOLDER EXAMPLE:

mkdir -p /var/lib/mysql/
fdisk /dev/sdb
mkfs.ext4 /dev/sdb1
ls -l /dev/disk/by-uuid

FSTAB CONFIGURATION:

@warlock
warlock / redimensionar_fs_ext.sh
Created January 31, 2019 09:54
Redimensionar particion en Linux
# Recuerda desmontar particion
umount /var/lib/mysql
# Listar discos y particiones. Ahi se puede observar el tamaño del disco y de la particion.
lsblk
# Lanzar fsck con autorepair
fsck -a /dev/sdb1
# Actualizar tabla de particiones