Skip to content

Instantly share code, notes, and snippets.

View Omranic's full-sized avatar

Abdelrahman Omran Omranic

View GitHub Profile
<?php
/*
* NOTICE OF LICENSE
*
* Part of the Rinvex Fort Package.
*
* This source file is subject to The MIT License (MIT)
* that is bundled with this package in the LICENSE file.
*
@Omranic
Omranic / ObjectListener.php
Created January 18, 2018 05:43 — forked from soyuka/ObjectListener.php
Streaming big json files the good way with php with https://soyuka.me/streaming-big-json-files-the-good-way/
<?php
namespace Fry;
use JsonStreamingParser\Listener;
/**
* This implementation allows to process an object at a specific level
* when it has been fully parsed
*/
class ObjectListener implements Listener
{
@Omranic
Omranic / pocketdedupe.py
Created December 29, 2017 13:52 — forked from Mierdin/pocketdedupe.py
A Python script to intelligently remove duplicate entries from Pocket
#!/usr/bin/env python
from pocket import Pocket
import webbrowser, sys
# Get consumer key from cmd line
consumer_key = sys.argv[1]
request_token = Pocket.get_request_token(
consumer_key=consumer_key,
<?php
# app/Validation/AllowedUsernameValidator.php
namespace App\Validation;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Routing\Router;
use Illuminate\Config\Repository;
#
# REQUIRES:
# - server (the forge server instance)
# - site_name (the name of the site folder)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - event_id (the provisioning event name)
# - callback (the callback URL)
#
@Omranic
Omranic / index.ejs
Created March 1, 2017 18:09 — forked from ksrb/index.ejs
jquery.inputmask webpack configuration and package.json
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<input id="float"/>
</body>
</html>
// 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 / pwa-serviceworker-data.md
Last active January 31, 2024 18:30
3. Use service workers to cache the forecast data - Your First Progressive Web App