Skip to content

Instantly share code, notes, and snippets.

View danyelkeddah's full-sized avatar
🤘

Danyel Alkeddah danyelkeddah

🤘
View GitHub Profile

Keybase proof

I hereby claim:

  • I am hanikeddah on github.
  • I am hanikeddah (https://keybase.io/hanikeddah) on keybase.
  • I have a public key ASAIFu2qbLle05CYYhWcPRj7xAwigU12sdJhmO6G9APj-Ao

To claim this, I am signing this object:

@danyelkeddah
danyelkeddah / sphp.sh
Created January 17, 2020 21:17 — forked from rhukster/sphp.sh
Easy Brew PHP version switching
#!/bin/bash
# Creator: Phil Cook
# Modified: Andy Miller
osx_major_version=$(sw_vers -productVersion | cut -d. -f1)
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2)
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3)
osx_patch_version=${osx_patch_version:-0}
osx_version=$((${osx_major_version} * 10000 + ${osx_minor_version} * 100 + ${osx_patch_version}))
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')
@danyelkeddah
danyelkeddah / medium_top_1000_tags.csv
Created May 14, 2020 21:21 — forked from baditaflorin/medium_top_1000_tags.csv
This is based on a scrapping project that i did, where i downloaded the list with all of the posts from medium.com https://medium.com/@baditaflorin
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 7 columns, instead of 4. in line 8.
"tag_name","count_tag_name","avg_reading_time","avg_recommends","avg_image_count","distinct_users","avg_post_data"
"Startup","134323","2.71552486545965","13.9311510314689219","1.7488739828622053","61152","2016-04-14 18:21:12.174416+03"
"Life","104197","1.78386182016248","9.0952714569517357","0.96809888960334750521","50767","2016-05-15 04:42:14.355121+03"
"Politics","99301","3.14315696061383","7.8097400831814383","1.2824543559480771","44825","2016-06-28 05:55:29.552608+03"
"Entrepreneurship","94911","2.79053337648529","14.2673241247063038","1.5481977852935908","43454","2016-04-19 22:28:35.956523+03"
"Life Lessons","94414","2.40382926434131","13.9626114771114453","1.1250450145105599","45045","2016-06-02 19:01:39.876276+03"
"Travel","80332","2.97209768940031","3.3994672110740427","4.3289224717422696","35644","2016-04-19 07:09:28.578+03"
"Design","75555","2.80802184122601","24.1416848653298921","3.5368142412811859","36471","2016-04-08 01:06:35.247556+03"
"Education","68855","2.74605567601954","6.1865369254229903"
@danyelkeddah
danyelkeddah / install-ev-and-event.sh
Created June 13, 2021 05:18
install ev and event
sudo apt-get install libevent-dev
sudo pecl install ev
sudo pecl install event
# Create configurations
sudo echo 'extension=ev.so' > /etc/php/8.0/mods-available/ev.ini
sudo echo 'extension=event.so' > /etc/php/8.0/mods-available/event.ini
sudo ln -s /etc/php/8.0/mods-available/ev.ini /etc/php/8.0/fpm/conf.d/20-ev.ini
sudo ln -s /etc/php/8.0/mods-available/ev.ini /etc/php/8.0/cli/conf.d/20-ev.ini
@danyelkeddah
danyelkeddah / Laravel-Container.md
Created April 28, 2022 20:12
Laravel's Dependency Injection Container in Depth

Laravel's Dependency Injection Container in Depth

Translations: Korean (by Yongwoo Lee)

Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.

Introduction to Dependency Injection

I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).

[defaults]
stdout_callback=unixy
interpreter_python=auto_silent
inventory=inventory
become = true
[localhost]
127.0.0.1 ansible_connection=local
@danyelkeddah
danyelkeddah / forge.sh
Created February 13, 2024 21:19 — forked from azimidev/forge.sh
Laravel Forge Setup Script
#
# REQUIRES:
# - server (the forge server instance)
# - event (the forge event instance)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - callback (the callback URL)
#
bind-key C-b send-prefix
bind-key C-o rotate-window
bind-key C-z suspend-client
bind-key Space next-layout
bind-key ! break-pane
bind-key " split-window
bind-key # list-buffers
bind-key $ command-prompt -I #S "rename-session '%%'"
bind-key % split-window -h
bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window