Skip to content

Instantly share code, notes, and snippets.

View Omranic's full-sized avatar

Abdelrahman Omran Omranic

View GitHub Profile
#
# 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)
#
<?php
# app/Validation/AllowedUsernameValidator.php
namespace App\Validation;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Routing\Router;
use Illuminate\Config\Repository;
@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,
@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
{
<?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.
*