Skip to content

Instantly share code, notes, and snippets.

View arabcoders's full-sized avatar

Abdulmohsen arabcoders

View GitHub Profile
BTW yum has last Redis too, remi repository at least.
$ sudo -i
$ yum list redis
$ redis.x86_64 2.6.13-1.el6.remi remi
But today we want compile redis from source (see http://redis.io/download)
$ yum install make gcc tcl
$ cd /usr/local/src
#!/usr/bin/php
<?php
// copied from http://phpadvent.org/2008/dont-commit-that-error-by-travis-swicegood
// authored by Travis Swicegood
$output = array();
$return = 0;
exec('git rev-parse --verify HEAD 2> /dev/null', $output, $return);
$against = $return == 0 ? 'HEAD' : '4b825dc642cb6eb9a060e54bf8d69288fbee4904';
<?php
require 'json.php';
$json = new JSON;
$json->foo->bar->baz = "foo";
$json->foo->biz = "test";
$json->baz = array();
$json->baz[1] = "testing";
# The VirtualBox documentation[1] for how to install guest additions
# for Linux on a virtual host is somewhat messy. So here is what
# I did to make it work.
# Install the packages required
yum update
yum install gcc kernel-devel make
reboot
@arabcoders
arabcoders / instaTweet.js
Last active December 16, 2015 20:59
Slightly modified version of Twitter Instagram Cards by ChrisBradBury, i fixed few bugs with the @grant option, and i've added open/close button for images & its now works when you load older tweets or new tweets comes in. original script URL : https://userscripts.org/scripts/show/153881
// ==UserScript==
// @name Twitter Instagram Cards - Photo Viewer
// @namespace http://chrisbradbury.net
// @author Chris Bradbuyr
// @author AbdulMohsen B. A. A.
// @version 1.2
// @description Now that Instagram have pulled their twitter support, this script adds back inline instagram photos.
// @include https://twitter.com/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.js
// @grant setTimeout

Microframework

This is a PHP microframework based on anonymous functions.

Features

  • requested URLs matched using regular expressions
  • request methods (matches using regular expressions too)
  • differenced FIFO queues for each $priority
  • command line usage
  • backward compatibility
  • integrated Dependency Injection system
  • settings system