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
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>
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!"
@planetacomputer
planetacomputer / failover-demo.py
Created November 16, 2019 15:09
failover Python3 InnoDB Cluster
failover Python3 InnoDB Cluster
@planetacomputer
planetacomputer / mysql8shell.py
Created October 19, 2019 13:56
MySQL Shell Python script
#
# MySQL 8 Shell
#
# This example shows a simple X DevAPI script to work with relational data
#
from mysqlsh import mysqlx # needed in case you run the code outside of the shell
# SQL CREATE TABLE statement
CREATE_TBL = """
CREATE TABLE `factory_sensors`.`trailer_assembly` (
`id` int auto_increment,