Discover gists
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) === | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated December 2021 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
const express = require('express') | |
const { WebhookClient } = require('dialogflow-fulfillment') | |
const app = express() | |
app.get('/', (req, res) => res.send('online')) | |
app.post('/dialogflow', express.json(), (req, res) => { | |
const agent = new WebhookClient({ request: req, response: res }) | |
function welcome () { | |
agent.add('Welcome to my agent!') |
const host = document.URL.match(/^[\w-]+:\/*\[?([\w\.:-]+)\]?(?::\d+)?/)[0]; | |
/** You can use also the window.location object which contains : | |
hash: "" | |
host: "www.soshcaraibe.fr" | |
hostname: "www.soshcaraibe.fr" | |
href: "https://www.soshcaraibe.fr/" | |
origin: "https://www.soshcaraibe.fr" | |
pathname: "/" | |
port: "" | |
protocol: "https:" |
import PyQt5 | |
from PyQt5 import QtCore | |
from PyQt5 import QtBluetooth | |
class DeviceFinder(QtCore.QObject): | |
def __init__(self): | |
super().__init__() | |
self.m_devices = [] |
A very basic setup for ruby/rails development using LazyVim
First, you'll of course need neovim. I personally just use the stable release over nightly just because I dislike when things randomly break, and I have to stop working to deal with it. But do whatever you like.
Probably a good idea to start it and run :checkhealth
to make sure everything works before proceeding.
## GOAL: | |
## re-create a figure similar to Fig. 2 in Wilson et al. (2018), | |
## Nature 554: 183-188. Available from: | |
## https://www.nature.com/articles/nature25479#s1 | |
## | |
## combines a boxplot (or violin) with the raw data, by splitting each | |
## category location in two (box on left, raw data on right) | |
# initial set-up ---------------------------------------------------------- |
cmake_minimum_required(VERSION 3.17) | |
set(CMAKE_SYSTEM_NAME Generic) | |
set(CMAKE_SYSTEM_VERSION 1) | |
# specify cross compilers and tools | |
set(CMAKE_C_COMPILER arm-none-eabi-gcc) | |
set(CMAKE_CXX_COMPILER arm-none-eabi-g++) | |
set(CMAKE_ASM_COMPILER arm-none-eabi-gcc) | |
set(CMAKE_AR arm-none-eabi-ar) | |
set(CMAKE_OBJCOPY arm-none-eabi-objcopy) | |
set(CMAKE_OBJDUMP arm-none-eabi-objdump) |
There are multiple options how to install MS Office on Linux.
VM-based - Integrate Windows apps running in a Windows VM as native-looking in Linux
- Winapps, based on KVM, QEMU, Virt-Manager, and FreeRDP. Still actively maintained (getting Github commits).
- Cassowary, based on KVM, QEMU, Virt-Manager, and FreeRDP. Has a helpful GUI and apparently can auto-suspend the VM when no Windows app is in use. Last release in Feb 2022 and seems to be abandoned.
The VM-based options means can run Office 2021 or Office 365 including all apps, but for me it was quite buggy and when I encounterd some (FreeRDP-related?) bug in both Winapps and Cassowary that meant I could only start Excel with an external screen plugged in, I gave up. bug