Skip to content

Instantly share code, notes, and snippets.

View voidnerd's full-sized avatar
:octocat:
Debugging

Ndifreke Friday voidnerd

:octocat:
Debugging
View GitHub Profile
// JOGGLING ASYNC
var http = require('http');
var urls = [process.argv[2], process.argv[3], process.argv[4]];
var count = 0;
var arr = [];
function get(a) {
http.get(urls[a], (res) => {
<?php
class Router{
public $get = []; //when get routes are defined it is save here
public $post = []; // post routes are saved when when defined
//make a function that defined get routes
public function get($url, $controller) {
$this->get[$url] = $controller; // push url and controller to get property array
}
@voidnerd
voidnerd / palindrome.php
Last active July 8, 2017 13:30
A php function that checks if string is Palindrome using OOP (Palindrome is a string that reads the same left-to-right and right-left-to-left).
<?php
class Palindrome {
public $words;
public $regex = '/[^A-Za-z0–9]/';
public $reserved;
public function __construct( $words)
{