Skip to content

Instantly share code, notes, and snippets.

@consti
consti / hosts
Last active April 23, 2024 19:50
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
@jsor
jsor / ddd_cqrs_event-sourcing_in_php.md
Last active April 23, 2024 19:48
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
@nullchilly
nullchilly / coc-pylance.md
Last active April 23, 2024 19:47
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] } })
@beryann
beryann / Gracieuse mélodie.rb
Created April 23, 2024 19:45
Gracieuse mélodie - Graceful melody (Sonic Pi)
live_loop :kick do
sample :bd_haus
sleep 1
end
puts scale(:c4,:major)
play chord_degree(:i, :c4, :major, 4)
progression = (ring, :i, :vi, :ii, :v)
@chenhunghan
chenhunghan / Install CJK fonts to reMarkable Tablet.md
Last active April 23, 2024 19:44
How to install Noto Sans CJK fonts for reMarkable Tablet

reMarkable is a paper tablet by https://remarkable.com/.

The reMarkable tablet is the best e-paper in the market. However, it does not have built-in support for CJK (Chiniese, Korean and Japanese) users.

Luckily, this could be resolved by installing CJK fonts on the tablet.

  1. Go to Preference > Storage > Enable USB web interface (Beta).
  2. Connect reMarkable with your PC via a microUSB cable.
  3. SSH to the device as user "root" using the password find in Preference > About. e.g. ssh root@10.11.99.1
  4. Download "NotoSansCJK[you language]-Regular.otf" from *note, there is limited space on the device, so do not sue "Super OpenType/CFF Collection (Super OTC)", an language-specific OTC is ok.
@nat-418
nat-418 / nix-home-manager-neovim-setup.md
Last active April 23, 2024 19:43
Manage Neovim plugins (and more!) with Nix and Home Manager

Manage Neovim plugins (and more!) with Nix and Home Manager

Highly extensible software like Emacs, Vim, and Neovim tend to grow their own package managers. A software developer, for example, might want to install editor plugins that hook into a particular programming language's linter or language server. The programmer's text editor is therefore extended to support managing additional software to extend the text editor. If this loop continues for too long, the programmer's editor becomes more delicate and complex. The remedy for this problem is to manage software using dedicated tools apart

@realark
realark / ctriangle.cpp
Last active April 23, 2024 19:41
opengl hello triangle on c++ and common lisp
#include <iostream>
#include <string>
#include <GL/glew.h>
#include <GL/glu.h>
#include <SDL2/SDL.h>
// compile and run:
// rm csdlopengl ; gcc -o csdlopengl ctraingle.cpp -lSDL2 -lGLEW -lstdc++ -lGL && ./csdlopengl
@mstevenson
mstevenson / IEnumeratorExtension.cs
Created April 10, 2016 00:31
Execute a Unity Coroutine in one frame without yielding
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public static class IEnumeratorExtensions
{
/// <summary>
/// Execute an entire Unity Coroutine in one frame.
/// This is useful for testing coroutines with NUnit.
///
@Bl4ckSh4rk
Bl4ckSh4rk / Pokemon-3DS-Title-List.txt
Last active April 23, 2024 19:37
List of Pokémon titles for Nintendo 3DS
Pokémon 3DS Title List
==========================================================================
ALL REGIONS
MAIN GAMES
0004000000055D00 Pokémon X [EKJA]
0004000000055E00 Pokémon Y [EK2A]
000400000011C400 Pokémon Omega Ruby [ECRA]
000400000011C500 Pokémon Alpha Sapphire [ECLA]
0004000000164800 Pokémon Sun [BNDA]
@psolyca
psolyca / honor_band_4_re.md
Last active April 23, 2024 19:37
Honor Band 4 RE

Introduction

Lots of works have been made to communicate with the Honor Band 3/4 in order to be used with GadgetBridge.
RE is followed in issue 1021 BTW, communication where not complete and the RE was done on BLE LPv2.
A new protocol LPv3 appeared.

Goal

RE the LPv3 BLE protocol and integrate Honor devices in GadgetBridge.

Keys