Skip to content

Instantly share code, notes, and snippets.

View mudassaralichouhan's full-sized avatar
:octocat:
It’s not a bug; it’s an undocumented feature.

Mudassar Ali mudassaralichouhan

:octocat:
It’s not a bug; it’s an undocumented feature.
View GitHub Profile
@geocachecs
geocachecs / chess.cpp
Created October 22, 2015 21:53
2 Player Chess Game C++
#include "chess.h"
Square::Square()
{
piece = EMPTY;
color = NONE;
}
void Square::setSpace(Square* space)
@oriolrivera
oriolrivera / index.php
Created June 22, 2015 06:16
Simple Chat Using WebSocket and PHP Socket
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8' />
<style type="text/css">
<!--
.chat_wrapper {
width: 500px;
margin-right: auto;
margin-left: auto;
@yosko
yosko / Dom2Array.php
Last active March 28, 2023 23:41
Dom2Array converts a DOMDocument object to a PHP array. Array2Dom just does the opposite
<?php
/**
* Recursive function to turn a DOMDocument element to an array
* @param DOMDocument $root the document (might also be a DOMElement/DOMNode?)
*/
function Dom2Array($root) {
$array = array();
//list attributes
/*
* Simple MD5 implementation
*
* Compile with: gcc -o md5 -O3 -lm md5.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@stealth35
stealth35 / WebSocket.php
Created June 5, 2011 17:47
PHP WebSocket
<?php
class WebSocket
{
protected $url;
protected $protocols;
protected $socket;
public function __construct($url, $protocols = array())
{
$this->url = $url;