Skip to content

Instantly share code, notes, and snippets.

View Vasilesk's full-sized avatar

Vasilii Morozov (Basil Morozov) Vasilesk

View GitHub Profile

Rust Cheat Sheet

Variables & Mutability

Variables are immutable by default. This makes Rust safer and makes concurrency easier.
Immutable means once a value is bound to that variable, it cannot be changed.
For example:

fn main() {
 let x = 5;
@maratori
maratori / golang-mocks.md
Last active September 15, 2024 20:06
Comparison of golang mocking libraries

Comparison of golang mocking libraries

Updated 2024-09-01

[gomock][1] [testify][2] + [mockery][3] [mockio][4] [minimock][5] [moq][6]

Library

GitHub stars [![s1]][1] [![s2]][2] + [![s3]][3] [![s4]][4] [![s5]][5] [![s6]][6]
Latest release date [![d1]][r1] [![d2]][r2] + [![d3]][r3] [![d4]][r4] [![d5]][r5] [![d6]][r6]
Maintained
@arno01
arno01 / docker-on-android.md
Last active August 24, 2024 05:10
Docker on Android

WORK IN PROGRESS

Docker on Android

Setup:

Samsung Galaxy Tab S5e SM-T720
Android Pie on Linux 4.9.112 (not rooted)
Termux
@fizvlad
fizvlad / vk-audio-downloader.js
Last active December 27, 2022 16:09 — forked from abler98/vk-audio-downloader.js
<UPD> Нерабочий </UPD> Скрипт для скачивания музыки VK
/*
Инструкция по использованию:
- Заходим в раздел с аудиозаписями
- Листаем в самый низ (Чтобы прогрузились все аудиозаписи) (Можно зажать клавишу PageDown)
- Открываем консоль браузера (F12 -> Консоль)
- Вставляем код и нажимаем Enter
- Скачивание началось...
- Браузер может потребовать разрешение на сохранение файлов, необходимо подтвердить действие
- Оставляем браузер на время прямо пропорциональное количеству аудиозаписей :)
@subfuzion
subfuzion / curl.md
Last active September 20, 2024 18:43
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@soheilhy
soheilhy / nginxproxy.md
Last active September 19, 2024 06:16
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active September 1, 2024 14:16
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
@mattetti
mattetti / multipart_upload.go
Last active August 21, 2024 04:52
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"