Skip to content

Instantly share code, notes, and snippets.

View NolPixel's full-sized avatar

MattH NolPixel

  • Indonesia
View GitHub Profile
@OutOfBrain
OutOfBrain / Intersect.php
Created April 26, 2016 07:54
Intersect arrays recursively in php.
<?php
class Interect
{
/**
* Return intersecting array of varargs arrays.
* Compares keys and values. Checks recursively.
* Returns empty array if no intersection.
*
@farhadi
farhadi / rc4.js
Created March 24, 2012 17:09
RC4 encryption in javascript and php
/*
* RC4 symmetric cipher encryption/decryption
*
* @license Public Domain
* @param string key - secret key for encryption/decryption
* @param string str - string to be encrypted/decrypted
* @return string
*/
function rc4(key, str) {
var s = [], j = 0, x, res = '';