Skip to content

Instantly share code, notes, and snippets.

Learning and developing

Ahmed Helal AhmedHelalAhmed

Learning and developing
View GitHub Profile
ddeveloperr /
Last active Jul 2, 2021
How to shutdown timer using Terminal/cmd on windows 10 and Linux & Mac OSX

Initial Steps

*1) Press Windows Key + R. *2) Enter CMD and press Enter.

Execute it

Write command in the cmd:

shutdown /s /t 3600
View Free O'Reilly

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x should do it)
  3. Run ./ and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
simonhamp / AppServiceProvider.php
Last active Jul 4, 2022
A pageable Collection implementation for Laravel
View AppServiceProvider.php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
public function boot()
leoloobeek /
Created Apr 26, 2017
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/ .
# python3 user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('{0}/gists'.format(user))
ayubmalik / es
Last active Aug 29, 2021
Bash script using Google Translate API to translate English to Spanish using curl and sed only. You can change the 'sl' and 'tl' (source/target language) query parameter to whatever you want. Optionally if you create a symlink and call it 'en' it will translate back to spanish
View es
# uncomment and fix with appropriate values if you are behind a proxy
#export https_proxy='http://localhost:3128'
tl=$(basename $0)
if [[ "${tl}" != "es" ]]; then
ua='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36'
damir-bubanovic / gist:d67d54b2c19aa233f51f63b3d9f0f4be
Last active Aug 6, 2018
Laravel 5 - create fake data with $faker & populate database
View gist:d67d54b2c19aa233f51f63b3d9f0f4be
* Faker Fileds:
* 1) Create database, model, migration
* 2) artisan make:seeder
ivanvermeyen / !
Last active May 16, 2022
Setup a Laravel Storage driver with Google Drive API
View !

Aligning images

left alignment

This is the code you need to align images to the left:

archy-bold / ExamplePassportTest.php
Last active Jan 28, 2022
Testing Passport Authenticated Controllers and Routes in Laravel
View ExamplePassportTest.php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ExamplePassportTest extends \PassportTestCase
use DatabaseTransactions;