Skip to content

Instantly share code, notes, and snippets.

@tVienonen
tVienonen / Bluetooth LE Dual Boot Connecting guide.md
Created February 23, 2020 17:24
Guide for pairing and connecting Bluetooth LE devices when using Linux and Windows dual boot

Bluetooth LE Dual Boot Connecting guide

  1. Pair and connect on Linux
  2. Pair and connect on Windows
  3. Shut down Bluetooth device
  4. Boot to Linux
  5. Mount Windows partition
  6. Go to <windows-mount>/Windows/System32/config
  7. Run command chntpw -e SYSTEM
  • Install chntpw if it is not available
@kizzx2
kizzx2 / docker-compose.yml
Last active April 26, 2024 12:22
Restart a docker container periodically with docker-compose
version: '3'
services:
app:
image: nginx:alpine
ports: ["80:80"]
restart: unless-stopped
restarter:
image: docker:cli
volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
@JohannesMP
JohannesMP / EnableDiscordDevExperiments.md
Last active April 26, 2024 12:21 — forked from ExordiumX/betaenabler.js
Enabling Discord Dev Experiments on Discord for Windows (2022-02)

Enable Dev Experiments in Discord for Windows

image

This guide shows how to enable dev mode for the Discord desktop application running on Windows (as of February 2022).

This can be used to view beta experiments to try features currently in development that are included but hidden by default in Discord release builds.


@nullchilly
nullchilly / coc-pylance.md
Last active April 26, 2024 12:20
Add pylance to coc.nvim

Install the pylance extension in vscode or manually download it from the marketplace

The extension path should be similar to this: ~/.vscode/extensions/ms-python.vscode-pylance-2023.11.10

In init.vim, this will automatically detect the latest pylance version because after an upgrade the old plugin might linger for a while:

call coc#config('languageserver', { "pylance": { "module": expand("~/.vscode/extensions/ms-python.vscode-pylance-*/dist/server.bundle.js", 0, 1)[0] } })
@diego3g
diego3g / settings.json
Last active April 26, 2024 12:18
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@AhmedMostafa16
AhmedMostafa16 / .font.conf
Created July 25, 2021 13:39
My .font.conf for perfect font rendering
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>~/.fonts</dir>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@matthen
matthen / hello_world.py
Last active April 26, 2024 12:17
Hello world in python, using genetic algorithm
"""Hello world, with a genetic algorithm.
https://twitter.com/matthen2/status/1769368467067621791
"""
import random
import time
from dataclasses import dataclass
from itertools import chain
from typing import Iterable, List
@fosterseth
fosterseth / awx_how_a_job_runs.md
Last active April 26, 2024 12:17
How a job runs
@bmaupin
bmaupin / free-database-hosting.md
Last active April 26, 2024 12:17
Free database hosting
@gelldur
gelldur / Grafana Alert Template.md
Last active April 26, 2024 12:17 — forked from Himura2la/Grafana Alert Template.md
How to use Grafana Alerts with the Telegram
  • Template name: telegram.message
  • Content:
    {{- /* Telegram message to use: {{ template "telegram.message2" . }} */ -}}
    {{ define "__alerts_list" -}}
    {{ range . }}
    {{if ne (index .Labels "alertname") "" -}}
    {{ if eq .Status "firing" }}🔴{{ else }}🟢{{ end }}
        {{- if ne (index .Labels "severity") "" -}}
            <u><b>P{{ index .Labels "severity" }}</b></u> {{ end -}}