Skip to content

Instantly share code, notes, and snippets.

View mo-karbalaee's full-sized avatar

Mohammad Karbalaee mo-karbalaee

View GitHub Profile
@mo-karbalaee
mo-karbalaee / count_down.md
Last active October 27, 2025 13:06
Useful Obsidian code snippets for my daily use. Feel free to copy and enjoy.
title: Semester Period
startDate: 2025-10-01
startTime: 08:00:00
endDate: 2026-03-29
endTime: 14:00:00
type: circle
color: #ff5722
trailColor: #f5f5f5
infoFormat: {percent}% complete - {remaining} until {end:LLL d, yyyy}

Okay, let's get your Ruby 2.6.10 updated! Since you're on a Mac, the best way to do this cleanly and manage your Ruby versions effectively is by using a Ruby version manager like rbenv.

Here's a step-by-step guide using rbenv:

1. Install rbenv and ruby-build (if you haven't already):

ruby-build is an rbenv plugin that simplifies the process of installing different Ruby versions.

  • Open your Terminal.
  • If you don't have Homebrew installed, install it first:
@mo-karbalaee
mo-karbalaee / podforceupdate.sh
Created March 1, 2024 23:31 — forked from mbinna/podforceupdate.sh
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@mo-karbalaee
mo-karbalaee / 15_aug_2023.md
Created August 15, 2023 15:09
Whatever I find interesting in my iOS dev journey

Hiding the scrollbar for lists

On iOS 16+ use the code below:

.scrollIndicators(.hidden)

For example:

List {
@mo-karbalaee
mo-karbalaee / habits.md
Created July 11, 2023 12:19
The good habits that I formed in summer 2023 and I want to continue them from now on.

1st

Going to the study room and doing my work there with full focus and mind control

2nd

@mo-karbalaee
mo-karbalaee / countries.json
Created April 12, 2023 13:21 — forked from bensquire/countries.json
JSON Country List based on the ISO-3366-1 Alpha-3 Codes, with eu countries marked
[
{
"code": "AFG",
"name": "Afghanistan",
"eu": false
},
{
"code": "ALA",
"name": "Åland Islands",
"eu": false
@mo-karbalaee
mo-karbalaee / countries.json
Created April 12, 2023 10:33 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@mo-karbalaee
mo-karbalaee / main.dart
Created April 10, 2023 08:40
forlorn-eucalyptus-8793
void main() {
for (int i = 0; i < 5; i++) {
print('hello ${i + 1}');
}
}
@mo-karbalaee
mo-karbalaee / 2023.feb.23.md
Last active March 8, 2023 17:42
Daily Flutter experiences and tips and tricks which I learn along the way. I will store the tips of each day separately on a markdown file.

StateFulBuilder

the variable which the state inside StateFulBuilder is dependant on should be defined outside the builder method of StateFulBuilder. If it is defined inside, It will not have any affect.

Container Color

A container should have either its color specified or its decoration specified. They cannot be mixed up. If you want to use both of them, the trick is to define the color inside BoxDecoration and pass it through the decoration field of your Container.

@mo-karbalaee
mo-karbalaee / readme.md
Created February 22, 2023 16:23
The trick to make an circle image in Flutter

Circle image in Flutter

wrap your image inside a CliRRect and give the BorderRadius.circular("width") to this widget which "width" is the width of the image itself.

Here is an example:

ClipRRect(
  borderRadius: BorderRadius.circular(10),
 child: Image.network(