Skip to content

Instantly share code, notes, and snippets.

View Roms1383's full-sized avatar
😊
I might not be available to respond, but I'll do my best !

Rom's Roms1383

😊
I might not be available to respond, but I'll do my best !
  • Chiang Mai, Thailand
View GitHub Profile
@Coutlaw
Coutlaw / tree_data_structure.rs
Last active March 1, 2023 00:01
Non-cyclical reference tree in Rust
use std::cell::RefCell;
use std::rc::{Rc, Weak};
// Implementation of a basic tree with out a cyclical reference, using strong and weak references
/*
* Every node is going to own its children, but share them so we can access each node directly
* to accomplish this, we make every child a Vec<T> and T is an Rc<Node> to maintain a reference count for the smart pointers
* We also need to be able to modify nodes that are children of other nodes
* to accomplish this we wrap each child Vec in RefCell<T>
* We also need to track who is the parent of the node
@alvistar
alvistar / buildx-cache-example.yaml
Created May 4, 2020 14:34
Buildx cache example for Github Actions
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
buildx-version: latest
qemu-version: latest
@Mefistophell
Mefistophell / RUST.MD
Last active May 23, 2024 09:11
How to Compile a Rust Program on Mac for Windows

Question: I want to compile my Rust source code for the Windows platform but I use macOS.

Solution:

  1. Install target mingw-w64: brew install mingw-w64
  2. Add target to rustup: rustup target add x86_64-pc-windows-gnu
  3. Create .cargo/config
  4. Add the instructions below to .cargo/config
[target.x86_64-pc-windows-gnu]
PostgreSQL Type PostgreSQL Size Description Range Diesel Type Rust Type
Nullable Types nullable Nullable``
@troyfontaine
troyfontaine / 1-setup.md
Last active June 18, 2024 16:03
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

prop_a4_pile_01
prop_a4_sheet_01
prop_a4_sheet_02
prop_a4_sheet_03
prop_a4_sheet_04
prop_a4_sheet_05
prop_abat_roller_static
prop_abat_slide
prop_acc_guitar_01
prop_acc_guitar_01_d1
@gitaarik
gitaarik / git_submodules.md
Last active June 18, 2024 00:44
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@henrik
henrik / ocr.markdown
Created March 3, 2012 17:07
OCR on OS X with tesseract

Install ImageMagick for image conversion:

brew install imagemagick

Install tesseract for OCR:

brew install tesseract --all-languages

Or install without --all-languages and install them manually as needed.