Skip to content

Instantly share code, notes, and snippets.

@johnathanmay
johnathanmay / logitech-mx-master-3-extras-for-linux-with-logiops.md
Last active May 8, 2024 22:25
How to install and configure PixlOne's logid to program Logitech MX Master 3 buttons on Linux.

Logitech MX Master 3 Extras for Linux With logiops

The Logitech Options program isn't available for Linux, but by a nice guy on GitHub (PixlOne) created an open source project that lets you obtain some of that functionality. It's called logiops. It works in conjunction with the Solaar project as well, which I find especially handy since that shows your available battery life in the system tray and lets you pair/unpair devices with the Logitech Unifying Receiver.

Here are some additional pages with info that I used to generate this documentation:

@geovannaotoni
geovannaotoni / docker.md
Last active May 8, 2024 22:25
Comandos Docker

Principais Comandos do Docker via CLI

Gerenciando Imagens

  • docker images: visualizar todas as imagens Docker presentes na máquina;
  • docker pull <nome-da-imagem>:<tag>?: baixar uma imagem do Docker Hub sem necessariamente executar esta imagem como um container;
  • docker rmi <nome/id-da-imagem>: remover uma imagem Docker (acrônimo das palavras ReMover Imagem);
  • docker build: construir uma imagem a partir de um Dockerfile;

Gerenciando Container

  • docker <comando> <subcomando> <parâmetros>: (Os <parâmetros> são opcionais na execução dos comandos);
@ax3l
ax3l / noglobal.py
Last active May 8, 2024 22:23
Useful Noglobal in Python
# License:
# I hereby state this snippet is below "threshold of originality" where applicable (public domain).
#
# Otherwise, since initially posted on Stackoverflow, use as:
# CC-BY-SA 3.0 skyking, Glenn Maynard, Axel Huebl
# http://stackoverflow.com/a/31047259/2719194
# http://stackoverflow.com/a/4858123/2719194
import types
@edonosotti
edonosotti / formula.md
Created March 19, 2018 12:04
Microsoft Excel formula to convert ISO 8601 date with milliseconds resolution to time stamp

Formula

This will convert an ISO 8601 date such as: 2018-03-19T10:18:08.137747874Z

to a timestamp with milliseconds resolution: 1521454688137,00

Please note that the decimal part (,00) can be stripped away, milliseconds are the last three digits.

=(((DATEVALUE(LEFT(A1;10))+TIMEVALUE(MID(A1;12;8)))-DATE(1970;1;1))*86400000)+VALUE(MID(A1;FIND(".";A1)+1;3))
@yanknudtskov
yanknudtskov / functions.php
Created June 4, 2019 07:31
get_posts meta_query example
<?php
$posts = get_posts( array(
'numberposts' => -1,
'post_type' => 'student',
'post_status' => 'publish',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'acf_student_group',
@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 22:14
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@chrismccord
chrismccord / dev.exs
Created May 8, 2024 20:06
Live Reload LiveView notify
config :wps, WPSWeb.Endpoint,
live_reload: [
notify: [
live_view: [
~r"lib/wps_web/core_components.ex$",
~r"lib/wps_web/(live|components)/.*(ex|heex)$"
]
],
patterns: [
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 8, 2024 22:10
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@vasanthk
vasanthk / System Design.md
Last active May 8, 2024 22:09
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 8, 2024 22:08
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory