Skip to content

Instantly share code, notes, and snippets.

@spoo-bar
spoo-bar / cosmos-windows.md
Last active May 12, 2024 11:39
A guide to run a cosmos sdk based chain on Windows natively

Cosmos on Windows

By the end of this guide, you will be running a Cosmos chain on your local machine. We will start with the assumption that you are on a clean fresh new Windows10/11 system.

We will be using Powershell as our terminal and not Command Prompt. I highly recommend you install Windows Terminal app. You can download it here from the Windows Store

❗This guide has not yet been tested with chains which use x/wasmd (Cosmwasm).

There are two ways to get Cosmos chains running on Windows.

@cpq
cpq / Mutex.md
Last active May 12, 2024 11:31
What is a mutex and how does it work

What is a mutex and how does it work

Imagine a big office (your program), with many assets (shared resources) and many employees (threads). For example, all employees share one common resource - a toilet. They have agreed to use a label on a toilet's door (mutex).

When an employee wants to use the toilet he checks a label on a door (locks a mutex). If it is "engaged" he waits (blocks on a mutex), then when it is "free", he enters the toilet and changes the label to

@eerien
eerien / forms.py
Last active May 12, 2024 11:20
Comma Separated Values Form Field for Django. There are CommaSeparatedCharField, CommaSeparatedIntegerField.
from django import forms
from django.core import validators
from django.core.exceptions import ValidationError
class MinLengthValidator(validators.MinLengthValidator):
message = 'Ensure this value has at least %(limit_value)d elements (it has %(show_value)d).'
class MaxLengthValidator(validators.MaxLengthValidator):
message = 'Ensure this value has at most %(limit_value)d elements (it has %(show_value)d).'
@JosefJezek
JosefJezek / how-to-use-pelican.md
Last active May 12, 2024 11:19
How to use Pelican on GitHub Pages
@zg
zg / freebsd-qemu-xhyve-mac-os-x-virtual-machine.md
Last active May 12, 2024 11:18
Create FreeBSD virtual machine using qemu. Run the VM using xhyve.

TL;DR

  • Create 10GB FreeBSD image using QEMU.
  • Run the VM using xhyve.
  • Mount host directory.
  • Resize the image.

Requisites

@mrousavy
mrousavy / MEMOIZE.md
Last active May 12, 2024 11:17
Memoize!!! 💾 - a react (native) performance guide
In computing, memoization or memoisation
is an optimization technique used primarily
to speed up computer programs by storing
the results of expensive function calls and  
returning the cached result when the same
inputs occur again.                                         
                                                     — wikipedia
@yestangchu
yestangchu / config.yaml
Created May 12, 2024 11:12 — forked from liuran001/config.yaml
mihomo (Clash Meta) 懒人配置
# mihomo (Clash Meta) 懒人配置
# 版本 V1.5-240507
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
# https://obdo.cc/meta
# 作者: 笨蛋ovo (bdovo.cc)
# Telegram: https://t.me/baka_not_baka
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta
# 转载请保留此注释
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@h3ssan
h3ssan / JetBrains trial reset.md
Last active May 12, 2024 11:07
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these

@hyblocker
hyblocker / README.md
Last active May 12, 2024 11:06
Unity Docs Syntax Highlighting