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 / tips.md
Last active February 18, 2023 00:16
The tips and tricks that I learn throughout the problems that I solve during my mobile development career

Builder with Getx

when you use the Builder widget, it has its own context, therefore the values inside it won't get updated as you expect. Because they are not part of the Getx's widget tree.

Flutter File Picker

As of the day that I am writing this tip, Feb 2023, Flutter File Dialog works flawlessly in both Android and iOS. If the file_picker package does not work for you then give this one a little try. You will not regret it.

@mo-karbalaee
mo-karbalaee / extension.md
Last active February 10, 2023 05:22
How to install gnome extensions.
@mo-karbalaee
mo-karbalaee / v2ray.md
Last active May 22, 2024 21:12
The steps I followed that let me install and run v2ray on linux successfully

1st

install v2ray via snap

sudo snap install v2ray

2nd

go to the installed directory of v2ray:

 cd /var/lib/snapd/void/
@mo-karbalaee
mo-karbalaee / installing-postman.md
Created January 12, 2023 20:42 — forked from pmkay/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
@mo-karbalaee
mo-karbalaee / xdotool.sh
Created January 10, 2023 23:55
To hide the sidebar of android emulator on Ubuntu
xdotool selectwindow
#type in the number you get from the previous command instead of <window id>
xdotool windowminimize <window id>
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
@mo-karbalaee
mo-karbalaee / background-clip-text-example.markdown
Last active July 13, 2022 17:52
background-clip: text example

background-clip: text example

/*
this is how you pass arguments when assigning a callback in React
*/
const callback = (event,argument) => {
console.log(argument) //will print yess
}
<div onClick={this.callback.bind(this,"yes")}>
hello world!
</div>
import com.google.gson.Gson;
import java.io.DataOutput;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;
public class Client {
public static void main(String[] args) throws IOException {
Socket socket = new Socket("localhost",5000);
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!