Skip to content

Instantly share code, notes, and snippets.

View mohammadkarbalaee's full-sized avatar

Mohammad Karbalaee mohammadkarbalaee

View GitHub Profile
@mohammadkarbalaee
mohammadkarbalaee / main.dart
Created April 10, 2023 08:40
forlorn-eucalyptus-8793
void main() {
for (int i = 0; i < 5; i++) {
print('hello ${i + 1}');
}
}
@mohammadkarbalaee
mohammadkarbalaee / 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(
you either rule yourself for your own passion,
or there is someone out there who will rule you
for his own passion.
That's up to YOU!
const prompt = require("prompt-sync")();
let rowsQuantity;
let columnsQuantity;
let matrix = [];
function getRowAndColumn(){
rowsQuantity = parseInt(prompt('how many rows does your matrix have? '));
columnsQuantity = parseInt(prompt('how many columns does your matrix have? '));
@pmkay
pmkay / installing-postman.md
Created April 27, 2020 02:49 — forked from ba11b0y/installing-postman.md
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Although I highly recommend using a snap

sudo snap install postman

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz
@betrcode
betrcode / remove-duplicate-logging-implementations.md
Last active December 28, 2023 10:48
How to get rid of duplicate logging implementations on classpath (slf4j, log4j12, logback)

How to find and remove duplicate logging implementations on classpath

Problem

If you have multiple logging implementations on the classpath, one will be picked in a non-deterministic ("random") way. You may see logging like this.

15:04:56.264 [ERROR] [system.err] SLF4J: Class path contains multiple SLF4J bindings.
15:04:56.265 [ERROR] [system.err] SLF4J: Found binding in [jar:file:/home/max/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-log4j12/1.7.6/6953717b9850aeb26d1b8375ca07dbd9c50eca4e/slf4j-log4j12-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
15:04:56.265 [ERROR] [system.err] SLF4J: Found binding in [jar:file:/home/max/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.3/7c4f3c474fb2c041d8028740440937705ebb473a/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
@ashishrana160796
ashishrana160796 / JavaDocCheatSheet.md
Last active June 24, 2024 21:07
JavaDoc CheatSheet : This gist contains basics of JavaDoc comments to get you up and running in no time.

JAVADOC CHEATSHEET

Introduction

The major important thing is the documentation has to be implementation independent and specification concise. Dependencies where ever necessary are allowed to be specified.
Also it is allows HTML tags to be used in between the documentation comments. Pretty much all tags are self explanatory.

Meta Annotations
@author  Ex: @author Jane Doe
@version  Ex: @version v1.0-alpha

@bensquire
bensquire / countries.json
Created October 20, 2016 11:03
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
@hectorperez
hectorperez / stop - start heroku app
Created September 15, 2014 16:29
stop/start heroku app
heroku ps:scale web=0
heroku ps:scale web=1
or
heroku maintenance:on
heroku maintenance:off
# http://stackoverflow.com/questions/2811453/how-to-stop-an-app-on-heroku
@Trippnology
Trippnology / Fade-off-the-bottom-of-an-image.markdown
Created October 18, 2013 12:45
CSS: Fade off the bottom of an image

Fade off the bottom of an image

This looks like a good way to limit the height of a dynamic image (perhaps user submitted).

A Pen by Trippnology on CodePen.

License.