Skip to content

Instantly share code, notes, and snippets.

@morad7
morad7 / Laravel-stylesheet.txt
Last active March 5, 2017 23:23
Laravel stylesheet
laravel new blog
---------------------------------------------------
subl . //sublime-text
---------------------------------------------------
php artisan serve
---------------------------------------------------
Route::get('about', function() {
$friends = ['Ismail', 'Nordine', 'Mounir'];
return view('about', compact('friends'));
});
@morad7
morad7 / Q&A GUIDE - PHP.md
Created September 3, 2016 12:06 — forked from tachymetre/Q&A GUIDE - PHP.md
UI-101 (PHP)
  1. Declare a new variable in PHP equal to the number 3 php $number = 3;

  2. How do you check if a variable has been set in PHP? php isset($var);

@morad7
morad7 / custom.css
Last active September 3, 2016 11:59
Ismail
.hide-bottom {
border-bottom-color: #fff !important;
}
.hide-left {
border-left-color: #fff !important;
}
.hide-right {
border-right-color: #fff !important;
}
@morad7
morad7 / ubuntu-compress.text
Created August 7, 2016 12:11
Ubuntu-compress-file
sudo apt-get install zip
zip -r compressed_filename.zip foldername
@morad7
morad7 / find-php-ini-ubuntu.txt
Created May 11, 2016 08:28
Ubuntu 16.04 find php.ini
/etc/php/7.0/apache2/php.ini
@morad7
morad7 / drush-commands.txt
Created April 26, 2016 11:10
Drush commands
#install specific version
drush pm-download drupal-7.43
#install latest dev version
drush pm-download drupal-7.x
@morad7
morad7 / install-drush-8.txt
Last active April 26, 2016 11:12
install drush 8
# Download latest stable release using the code below or browse to github.com/drush-ops/drush/releases.
wget http://files.drush.org/drush.phar
# Or use our upcoming release: wget http://files.drush.org/drush-unstable.phar
# Test your install.
php drush.phar core-status
# Rename to `drush` instead of `php drush.phar`. Destination can be anywhere on $PATH.
chmod +x drush.phar
sudo mv drush.phar /usr/local/bin/drush
@morad7
morad7 / auto-increment-google-sheet.txt
Created April 7, 2016 09:38
Googe Auto-increment number script
function onFormSubmit(e) {
var sheet = SpreadsheetApp.getActiveSheet();
var row = SpreadsheetApp.getActiveSheet().getLastRow();
sheet.getRange(row,18).setValue(row);
}
@morad7
morad7 / ubuntu-static-ip.txt
Created March 21, 2016 11:42
Ubuntu set static IP
To assign a static IP you need to edit /etc/network/interfaces.
The interface will probably be called eth0.
The current entry will look something like
auto eth0
iface eth0 inet dhcp
You will need you need to change this to:
@morad7
morad7 / shutdown-server.text
Created March 21, 2016 11:41
Ubuntu shutdown and reboot
//Try using the following command to reboot:
sudo reboot
//If, instead, you want to shut down the server safely, use this command:
sudo shutdown -h now