Skip to content

Instantly share code, notes, and snippets.

Riad Benguella youknowriad

Block or report user

Report or block youknowriad

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View entity-providers.js
// Probably a file in core-data module
* WordPress dependencies
import { createContext, useContext } from '@wordpress/element';
import { useSelect, useDispatch } from '@wordpress/data';
const PostEntityContext = createContext( null );
const SiteEntityContext = createContext( null );
youknowriad / gulpfile.js
Last active Jul 24, 2019
ES6 + ES5 Workflow gulpfile
View gulpfile.js
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var del = require('del');
var source = require('vinyl-source-stream');
var _ = require('lodash');
var extReplace = require('gulp-ext-replace');
var less = require('gulp-less');
var gulpMerge = require('merge-stream');
var ngTemplates = require('gulp-ng-templates');
# ----
# Script de backup serveur perso vers serveur distant
# Fonctionnemenent :
# 1. Targz de /var/www
# 2. Dump de toutes les bases de données MySql
# 3. Zip du backup courant avec protection par mot de passe
# 4. Envoi sur serveur distant
youknowriad / .anchour
Created Sep 15, 2012
Deploying Wordpress And Theme with anchour
View .anchour
type: "ftp"
host: %ftp_host%
username: %ftp_username%
password: %ftp_password%
youknowriad / Rpm.php
Created Sep 13, 2012
RpmQuery : A quick class to monitor installed Rpms with rpm -q
View Rpm.php
class Rpm
const FILED_SEPARATOR = ';;;';
const ROW_SEPARATOR = '|||';
public function listPackages()
$parameters = array('name', 'version', 'packager');
youknowriad /
Created Sep 12, 2012
Checkout Pull Requests
git config --global --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"
git checkout pr/2
youknowriad / signals.php
Created Sep 10, 2012
Callback for process signals in PHP
View signals.php
function callback() {
echo 'callback ...';
pcntl_signal(SIGTERM, 'callback');
pcntl_signal(SIGINT, 'callback');
You can’t perform that action at this time.