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 May 19, 2024 21:04
Comparison of golang mocking libraries

Comparison of golang mocking libraries

Updated 2024-05-19

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

Library

GitHub stars [![s6]][6] [![s2]][2] + [![s3]][3] [![s4]][4] [![s5]][5] [![s1]][1]
Latest release date [![d6]][r6] [![d2]][r2] + [![d3]][r3] [![d4]][r4] [![d5]][r5] [![d1]][r1]
Maintained :white_check
@arno01
arno01 / docker-on-android.md
Last active October 19, 2023 07:48
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 May 28, 2024 20:13
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 May 16, 2024 08:59
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 May 25, 2024 05:56
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# 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
eval "$(ssh-agent -s)"
@mattetti
mattetti / multipart_upload.go
Last active April 22, 2024 05:24
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"