Skip to content

Instantly share code, notes, and snippets.

View Omranic's full-sized avatar

Abdelrahman Omran Omranic

View GitHub Profile
@Omranic
Omranic / pwa-serviceworker-appshell.md
Last active August 1, 2023 23:04
2. Use service workers to pre-cache the App Shell - Your First Progressive Web App
@Omranic
Omranic / pwa-fast-load.md
Last active May 22, 2020 14:06
1. Fast first load - Your First Progressive Web App
@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 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 / 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) {
@Omranic
Omranic / gist:86760e5b1e1fa2ff1610
Created October 3, 2015 11:26 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat