Skip to content

Instantly share code, notes, and snippets.

View Omranic's full-sized avatar

Abdelrahman Omran Omranic

View GitHub Profile
// Install/upgrade amazon cli tools
pip install --upgrade --user awscli
// Check amazon cli installation
aws --version
// Uninstall amazon cli tools
pip uninstall awscli
// Check pip version
@Omranic
Omranic / rinvex.country.sample.php
Last active December 11, 2016 14:44
Code sample for rinvex/country package
<?php
// Get single country
$egypt = country('eg');
// Get country name // Get country native name
echo $egypt->getName(); echo $egypt->getNativeName();
// Get country official name // Get country ISO 3166-1 alpha2 code
echo $egypt->getOfficialName(); echo $egypt->getIsoAlpha2();
@Omranic
Omranic / pwa-serviceworker-native-deploy.md
Last active October 27, 2016 19:22
4. Support native integration & Deploy online - Your First Progressive Web App
@Omranic
Omranic / UserRepository.php
Last active October 26, 2016 13:57
Part of rinvex/repository implementation examples
<?php
namespace App\Repositories;
use Rinvex\Repository\Repositories\EloquentRepository;
class UserRepository extends EloquentRepository
{
protected $repositoryId = 'rinvex.repository.user';
@Omranic
Omranic / UsersController.php
Last active September 22, 2016 06:41
Rinvex Repository is a simple, intuitive, and smart implementation of Active Repository with extremely flexible & granular caching system for Laravel, used to abstract the data layer, making applications more flexible to maintain. https://github.com/rinvex/repository
<?php
namespace App\Http\Controllers;
use App\Repositories\UserRepository;
class UsersController
{
public function baz(UserRepository $users)
{
@Omranic
Omranic / UserRepository.php
Last active July 14, 2016 03:38
Rinvex Repository is a simple, intuitive, and smart implementation of Active Repository with extremely flexible & granular caching system for Laravel, used to abstract the data layer, making applications more flexible to maintain. https://github.com/rinvex/repository
<?php
namespace App\Repositories;
use Illuminate\Contracts\Container\Container;
use Rinvex\Repository\Repositories\EloquentRepository;
class UserRepository extends EloquentRepository
{
public function __construct(Container $container)
@Omranic
Omranic / RepositoryContract.php
Last active June 25, 2016 23:06
Active Repository
<?php
interface RepositoryContract
{
public function find($id, $columns = ['*'], $with = []);
public function findBy($attribute, $value, $columns = ['*'], $with = []);
public function findAll($columns = ['*'], $with = []);
@Omranic
Omranic / meta-tags.md
Created June 17, 2016 22:59 — forked from jaigouk/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@Omranic
Omranic / GIF-Screencast-OSX.md
Created April 7, 2016 16:54 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@Omranic
Omranic / googleforms2slack.gs
Created March 26, 2016 01:51 — forked from andychase/googleforms2slack.gs
Google Forms Slack Notification
// Google Forms Slack Notification
// Andy Chase <github.com/andychase>
// License: CC0 1.0 Universal <creativecommons.org/publicdomain/zero/1.0>
// Install 1: This code goes in ( tools > script editor... ) of your google docs form
// Install 2: ( resources > current project triggers ) ( [onSubmit], [from Form], [On form submit] )
// Setup 1: Put your slack api url below
var POST_URL = "https://hooks.slack.com/services/";
function onSubmit(e) {