Photons are dying.
Eyelids still blink.
Clock keep ticking.
Heart beat slowly.
Parasites rise.
Cerebral cells collide.
Troubles spread.
Ions crackle.
Soul screams.
Brain throttles.
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
#! /usr/bin/env python3 | |
from ev3dev2.led import Leds | |
from ev3dev2.sound import Sound | |
from ev3dev2.motor import OUTPUT_B, OUTPUT_C, SpeedPercent, MoveTank | |
from ev3dev2.sensor.lego import InfraredSensor, TouchSensor | |
sound = Sound() | |
leds = Leds() | |
ts = TouchSensor() |
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
# coding:utf-8 | |
# Copyright 2011 litl, LLC. All Rights Reserved. | |
import httplib | |
import re | |
import urllib | |
import urlparse | |
from flask import Blueprint, request, Response, url_for | |
from werkzeug.datastructures import Headers |
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/bash | |
# | |
# Create a MariaDB user for the backups: | |
# | |
# CREATE USER 'backupuser'@localhost IDENTIFIED BY 'password'; | |
# GRANT SELECT ON *.* TO 'backupuser'@'localhost'; | |
# FLUSH PRIVILEGES; | |
# | |
# Tested for a MONARC installation: |
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
$ locate bin/postgres | |
/usr/lib/postgresql/10/bin/postgres | |
/usr/lib/postgresql/12/bin/postgres | |
/usr/lib/postgresql/9.5/bin/postgres | |
$ sudo pg_lsclusters | |
$ mkdir backup-pg | |
$ sudo cp -R /var/lib/postgresql/9.5 backup-pg |
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
# Configure and install pyenv: | |
# https://gist.github.com/cedricbonhomme/ababe00d0a675ea5c69d777276e8f375 | |
# Install apxs2: | |
sudo apt install apache2-dev | |
# Install Python with shared libraries support: | |
CONFIGURE_OPTS=--enable-shared pyenv install 3.10.0 |
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
#! /usr/bin/env python | |
# -*- coding: utf-8 - | |
import requests | |
import uuid | |
# The JSON object | |
json_object = { | |
"authors": ["Consortium GARR [www.garr.it]"], |
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/bash | |
# Defore executing this script you must install curl and jq: | |
# sudo apt-get install curl jq | |
set -e | |
# database user: |
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
name: "Close stale issues" | |
on: | |
schedule: | |
- cron: "15 4 * * 1,3,5" | |
jobs: | |
stale: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/stale@v3 |
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
# Installation of a decent editor, emacs | |
$ sudo apt install emacs | |
# Prerequisites to build Python | |
$ sudo apt install make build-essential libssl-dev zlib1g-dev libbz2-dev \ | |
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | |
xz-utils tk-dev libffi-dev liblzma-dev libxml2-dev libxslt-dev libpq-dev python3-openssl | |
NewerOlder