Skip to content

Instantly share code, notes, and snippets.

View planetacomputer's full-sized avatar
👓
Nulla dies sine linea

planetacomputer

👓
Nulla dies sine linea
  • Barcelona
View GitHub Profile
@planetacomputer
planetacomputer / edison-linkat.sh
Last active October 4, 2024 10:08
Resolució incidència Edison en Notebooks amb Linkat
# Create rule
touch /etc/udev/rules.d/60-edison.rules
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="16d0", MODE="0664", GROUP="plugdev"' >> /etc/udev/rules.d/60-edison.rules
# Add current user to plugdev group
usermod -a -G plugdev $USER
# Reload udev rules
udevadm control --reload-rules
@planetacomputer
planetacomputer / microbit-linkat.sh
Last active October 3, 2024 08:30
Resolució incidència Microbit en Chromebooks amb Linkat
# Create rule
touch /etc/udev/rules.d/50-microbit.rules
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", MODE="0664", GROUP="plugdev"' >> /etc/udev/rules.d/50-microbit.rules
# Add current user to plugdev group
usermod -a -G plugdev $USER
# Reload udev rules
udevadm control --reload-rules
This file has been truncated, but you can view the full file.
CREATE DATABASE IF NOT EXISTS blog;
USE blog;
DROP TABLE IF EXISTS blog.posts;
DROP TABLE IF EXISTS blog.users;
CREATE TABLE blog.users (
username STRING PRIMARY KEY,
last_name STRING NOT NULL,
first_name STRING NOT NULL,
CREATE DATABASE IF NOT EXISTS clients_veh;
USE clients_veh;
DROP TABLE IF EXISTS clients_veh.client_vehicles;
CREATE TABLE client_vehicles (
id UUID PRIMARY KEY,
last_name STRING NULL,
first_name STRING NULL,
vehicle_info JSONB NULL
[ {
"id": "1",
"firstname": "Wilhelm Conrad",
"surname": "R\u00f6ntgen",
"born": "1845-03-27",
"died": "1923-02-10",
"bornCountry": "Prussia (now Germany)",
"bornCountryCode": "DE",
"bornCity": "Lennep (now Remscheid)",
"diedCountry": "Germany",
<!-- Window snapping code we are adding -->
<keybind key="Super-Left">
<action name="UnmaximizeFull"/>
<action name="MoveResizeTo">
<width>50%</width>
<height>100%</height>
<x>0%</x>
<y>0%</y>
</action>
</keybind>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
site_name: Preseed Ubuntu Desktop ISO 💿 per Emmy Noether
nav:
- Una Ubuntu ISO per Emmy Noether: index.md
- Què significa crear un preseed per una ISO d'Ubuntu?: preseed.md
- Com editar un fitxer ISO?:
- "Instal·lació d'ISO Master": editariso/isomaster.md
- "Edició i emmagatzemament de la ISO": editariso/edicio.md
- Els fitxers a modificar:
- "Configuració de ks.preseed": fitxers/kspreseed.md
- "Configuració de txt.cfg": fitxers/txtcfg.md
@planetacomputer
planetacomputer / deleteNotMDCells.py
Created May 3, 2021 04:47
Jupyter - Delete all code cells except markdown text
import nbformat as nbf
ntbk = nbf.read("Exercises_numpy.ipynb", nbf.NO_CONVERT)
cells_to_keep = []
for cell in ntbk.cells:
if cell.cell_type == "markdown":
cells_to_keep.append(cell)
new_ntbk = ntbk
new_ntbk.cells = cells_to_keep
nbf.write(new_ntbk, "new_md_only_notebook.ipynb", version=nbf.NO_CONVERT)
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"