Skip to content

Instantly share code, notes, and snippets.

@deidine
Last active January 20, 2024 07:51
Show Gist options
  • Save deidine/ee61e7be3341aff32c269bb73ea1512e to your computer and use it in GitHub Desktop.
Save deidine/ee61e7be3341aff32c269bb73ea1512e to your computer and use it in GitHub Desktop.
this is gist is for begening in framework
###################################
@react js
npx create-react-app my-app
cd my-app
npm start
npm install pour installer les pakage
npm install -g npm-check-updates #pour voir si il'ya nouvelle update in npm
npm install --legacy-peer-deps #if you have some new dependacy
npm install --force
@angular
to create angular project
add this to package.json and run npm start to create empty file package.json run npm init -y
"scripts": {
"ng": "ng",
"start": "ng new deidine && cd deidine && ng serve",
}
node app.js run the node js sever
https://www.freecodecamp.org/news/getting-started-with-react-a-modern-project-based-guide-for-beginners-including-hooks-2
###################################
@larvel
php --version #il doit etre > 7.4 & < 8
composer install pour #installer les pakages issing
composer install --ignore-platform-reqs #si le vesrion e petite
php artisan key:generate # pour donner un cle unique
php artisan migrate:refresh #pour creez les bas de donner
php artisan serve #pour runer l'application
/pour ajouter google map il faut sepicifier le place puis clcik share apres clcick embaded map
@yield("contenu") lahi t3oud t apppele chi kaml 2smou @section('contenu') @extends('layouts.admin') pour appliquer @yield
et @section
@extends 2lla kiv @include ykoun @extends 7d lahi y3ml yield et section
###################################
@react-native
npx create-expo-app myapp
cd myapp
npx expo start
expo start --web
npx expo-cli start --for runing in web https://necolas.github.io/react-native-web/docs/installation/
-------------------------------------------------
navigate beetwen files https://blog.logrocket.com/react-native-navigation-tutorial/
install es7 for react extention
###################################
@javaswing
#setResizable(false);//pour lesser le window sans changer leur size
#Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setSize(screenSize.width, screenSize.height);pour agrandir le window le maximum size
#dispose(); pour fermer le venter si on veux aller ver une autre
###################################
to run @c sharp
dotnet new console -o app
cd app
dotnet run name.cs
for more information visite the site below
https://travis.media/how-to-run-csharp-in-vscode/
###################################
@run c code
create file.c run it by gcc file.c then go to a.exe file and done
gcc sourcefile_name.c -o outputfile.exe
to run c++ code ==> g++ -o file file.cpp
run it by ./a.exe
###################################
@javafx in vs code
click debug the clik create file lanch
after that add this "vmArgs": "--module-path /javafx/javafx-sdk-20.0.2/lib --add-modules javafx.controls,javafx.fxml",
under perojectname
###################################
@springboot
###################################
@django
install all requirement in file => pip freeze > requirements.txt
1)pyhton -m venv .venv
2).venv\Scripts\Activate.bat #this commende for activate venv enveironement and you chould desactivate
if finch the worcking on the project and activate it if you start workin on it agin
3)pip install django
4)django-admin startproject django_project .
5)python manage.py runserver #to run the server on the port 8000
6)python manage.py migrate #for run the model to database
7)django-admin startapp pages
8)python manage.py makemigrations pages #will create table pages in database then run python manage.py migrate #to make the changes
9)python manage.py sqlmigrate pages 0001 #is like show sql commande
10)python manage.py migrate
11)python manage.py shell #show shell in python
12)python manage.py createsuperuser # will create login for admin
###################################
@adb
//stop the terminal
adb kill-server
adb tcpip 5555
//connect to remote devices
adb connect 10.100.68.106:5555
adb devices
//aficher les divices connected
adb devices
//allow external connections
adb reverse tcp:5555 tcp:5555
//Transfers a file from your computer to the device Example: adb push C:\local_file.txt /sdcard/
adb push <local_file> <remote_directory>
adb pull <remote_file> <local_directory>
//exemple adb pull /sdcard/remote_file.txt C:\local_folder
adb install <apk_path>
adb uninstall <package_name>
adb logcat
//reboot devices
adb reboot
//Enables TCP/IP mode for connecting over Wi-Fi.
adb tcpip 5555
//pour shutdown the phone
adb shell
reboot -p
//
//pour ouvrir le telephojne
adb shell input text abrir && adb shell input keyevent 66
XXX c'est le mots de pass
//
adb shell input keyevent 26 #Pressing the lock button close phone
###################################
###################################
###################################
###################################
###################################
###################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment