Skip to content

Instantly share code, notes, and snippets.

View chadidi's full-sized avatar
🌴
On vacation

Abdellah Chadidi chadidi

🌴
On vacation
View GitHub Profile
@chadidi
chadidi / Resources.md
Last active September 26, 2022 20:28
My favorite backend development resources ⭐️
@chadidi
chadidi / list-cities-morocco-98j.csv
Last active March 20, 2022 13:26
List of Moroccan cities and towns.
Sr.No City Population Province Region
(2004 census)
1 Casablanca 29,36,874 Casablanca Grand Casablanca
2 Fes 9,44,376 Fes Fes-Boulemane
3 Sale 8,14,871 Sale Rabat-Sale-Zemmour-Zaer
4 Marrakesh 7,94,620 Marrakesh Marrakesh-Tensift-El Haouz
5 Tangier 6,64,295 Tanger Assila Tangier-Tetouan
6 Rabat 6,20,996 Rabat Rabat-Sale-Zemmour-Zaer
7 Meknes 5,35,066 Meknes Meknes-Tafilalet
8 Oujda 3,98,131 Oujda Angad Oriental
@chadidi
chadidi / touchegg.conf
Created January 8, 2021 17:45
Dell XPS touchegg config (POP OS)
<touchégg>
<settings>
<!--
Delay, in milliseconds, since the gesture starts before the animation is displayed.
Default: 150ms if this property is not set.
Example: Use the MAXIMIZE_RESTORE_WINDOW action. You will notice that no animation is
displayed if you complete the action quick enough. This property configures that time.
-->
<property name="animation_delay">150</property>
{
"basics": {
"name": "Abdellah Chadidi",
"picture": "https://avatars3.githubusercontent.com/u/9916806?v=4",
"label": "@fevrok",
"headline": "Founder @fevrok and developer @AirbitUK, sometimes contributer to @LaravelArab and other open source projects...\r\n",
"summary": "test",
"website": "chadidi.dev",
"blog": null,
"yearsOfExperience": 5,
@chadidi
chadidi / posts raw 2
Last active June 3, 2020 21:21
posts without eager loads and appends
[2020-06-03 21:20:43] local.INFO: select posts.*, count(likes.id) + count(comments.id) as total_count from `posts` left join `likes` on `posts`.`id` = `likes`.`likable_id` and `likes`.`likable_type` = ? left join `comments` on `posts`.`id` = `comments`.`commentable_id` and `comments`.`commentable_type` = ? where `posts`.`deleted_at` is null group by `posts`.`id` order by `total_count` desc ["posts","posts"]
[2020-06-03 21:17:22] local.INFO: select posts.*, count(likes.id) as total_likes, count(comments.id) as total_comments, count(likes.id) + count(comments.id) as total_count from `posts` left join `likes` on `posts`.`id` = `likes`.`likable_id` and `likes`.`likable_type` = ? left join `comments` on `posts`.`id` = `comments`.`commentable_id` and `comments`.`commentable_type` = ? where `posts`.`deleted_at` is null group by `posts`.`id` order by `total_count` desc ["posts","posts"]
[2020-06-03 21:17:22] local.INFO: select count(*) as aggregate from `comments` where `comments`.`commentable_id` = ? and `comments`.`commentable_id` is not null and `comments`.`commentable_type` = ? and `comments`.`deleted_at` is null [1,"posts"]
[2020-06-03 21:17:22] local.INFO: select count(*) as aggregate from `users` inner join `likes` on `users`.`id` = `likes`.`user_id` where `likes`.`likable_id` = ? and `likable_type` = ? and `likes`.`deleted_at` is null and `users`.`deleted_at` is null [1,"posts"]
[2020-06-03 21:17:22] local.IN
[2020-06-03 21:09:38] local.INFO: select count(*) as aggregate from `posts` left join `likes` on `posts`.`id` = `likes`.`likable_id` and `likes`.`likable_type` = ? left join `comments` on `posts`.`id` = `comments`.`commentable_id` and `comments`.`commentable_type` = ? where `posts`.`deleted_at` is null group by `posts`.`id` ["posts","posts"]
[2020-06-03 21:09:38] local.INFO: select posts.*, count(likes.id) + count(comments.id) as total_count from `posts` left join `likes` on `posts`.`id` = `likes`.`likable_id` and `likes`.`likable_type` = ? left join `comments` on `posts`.`id` = `comments`.`commentable_id` and `comments`.`commentable_type` = ? where `posts`.`deleted_at` is null group by `posts`.`id` order by `total_count` desc limit 15 offset 0 ["posts","posts"]
[2020-06-03 21:09:38] local.INFO: select * from `users` where `users`.`id` in (4, 1) and `users`.`deleted_at` is null
[2020-06-03 21:09:38] local.INFO: select * from `pages` where `pages`.`id` in (1, 2) and `pages`.`deleted_at` is null
[2020-06
{
"debug": {
"database": {
"total": 166,
"items": [
{
"connection": "mysql",
"query": "select count(*) as aggregate from `posts` left join `likes` on `posts`.`id` = `likes`.`likable_id` and `likes`.`likable_type` = 'posts' left join `comments` on `posts`.`id` = `comments`.`commentable_id` and `comments`.`commentable_type` = 'posts' where `posts`.`deleted_at` is null group by `posts`.`id`;",
"time": 6.89
},
@chadidi
chadidi / hyper-settings
Created May 14, 2019 00:49
Abdellah Chadidi Hyper settings
{}
Future<Map<String, dynamic>> createActivity(activityData) async {
print('creating activity...');
var url = "https://www.tapographics.com/api/activity";
print(activityData);
final http.Response response =
await http.post(Uri.encodeFull(url), body: json.encode(activityData));
// debug