Skip to content

Instantly share code, notes, and snippets.

View pvilas's full-sized avatar
💭
Working on a financial webservice idea

Pere Vilas pvilas

💭
Working on a financial webservice idea
  • Cálida Ibiza, SA
  • Eivissa Ibiza (Spain)
View GitHub Profile
@pvilas
pvilas / compost-a-casa.md
Created May 21, 2020 08:55
Com fer compost a casa

A una capsa de cartó, mesclar dos parts de filagasa de coco amb una de closa d'arroç

Hi anam tirant tots es fems, ben capolats i els airetjam amb una paleta

Fàcil de compostar:

  • Vegetales crudos o cocidos
  • Trozos de fruta (las cáscaras de cítricos tardan más)
  • Hechos de té y café
@pvilas
pvilas / diccionari_angles.md
Last active July 9, 2020 07:43
Some english vocabulary and expressions

Shatter /shate/ : Romper, destruir, destrozar

Scramble : Luchar, like in Scrambles to stem its own outbreak Luchar para detener su propio brote

Strive /strīv/ : Esforzarse, luchar, afanarse, pugnar, like in striving to meet a surge in demand tratando de satisfacer un aumento de la demanda

Stem /stem/ : Sustantivo - Vástago, brote : Verbo - Restañar, refrenar, represar (dam)

Stir /stər/ (incidir en la ə) : Remover, suscitar, like in Stirred concerns Suscitar inquietudes

@pvilas
pvilas / zz-reboot.md
Created January 24, 2020 09:21
Rebootar màquina cada dia

Crear fitxer a /etc/cron.daily/zz-reboot

#!/bin/sh
shutdown -r now

i fer sudo chmod a+x zz-reboot

En ubuntu, s'executa cada dia a les 06:25h, ho podem comprovar fent

@pvilas
pvilas / grafs-pac2.ipynb
Created November 18, 2019 13:16
Grafs-PAC2.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pvilas
pvilas / pac1.ipynb
Created October 21, 2019 14:54
PAC1.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pvilas
pvilas / pac1.ipynb
Created October 21, 2019 14:46
PAC1.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pvilas
pvilas / dns-sd.md
Created September 17, 2019 08:08
Apunts de dns-sd

Anunciar un servei fake

dns-sd  \
   -R "A Fake Announcement to Register a Dummy HTTP Server" \
   _http._tcp,_universal \
   .   \
   8081

Chequear si hi ha s'anunci

@pvilas
pvilas / radius-vlan.md
Last active September 9, 2019 11:06
Radius VLAN info on Accept message

From https://documentation.meraki.com/MR/Client_Addressing_and_Bridging/RADIUS_Override:

A RADIUS server has the ability to send VLAN information to the AP in RADIUS Access Accept messages. To send VLAN information, three required RADIUS attributes must be configured in your RADIUS policy:

  • Tunnel-Type: Choose Attribute value Commonly used for 802.1X and select Virtual LANs (VLANs).
  • Tunnel-Medium-Type: Choose 802 (Includes all 802 media plus Ethernet canonical format) for the Attribute value Commonly used for 802.1X.
  • Tunnel-Private-Group-ID: Choose String and enter the VLAN desired (ex. "500"). This string will specify the VLAN ID 500.

Sample FreeRADIUS user configuration (/etc/freeradius/3.0/users):

@pvilas
pvilas / list_to_comma.py
Created February 26, 2019 09:30
Convert a list into a comma separated string
", ".join(map( lambda x: str(x), labels)