Skip to content

Instantly share code, notes, and snippets.

View kingsleyudenewu's full-sized avatar

Udenewu Kingsley kingsleyudenewu

  • LawPavion
  • Lagos
View GitHub Profile
.App {
text-align: center;
}
.App-logo {
animation: App-logo-spin infinite 20s linear;
height: 80px;
}
.App-header {
@kingsleyudenewu
kingsleyudenewu / visor-archivos-online.md
Created June 1, 2017 18:07 — forked from izazueta/visor-archivos-online.md
Google Docs Viewer & Office Web Apps Viewer

Google Docs Viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 16 different file types, listed below:

  • Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
  • Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
  • Text files (.TXT)
  • Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
  • Microsoft Word (.DOC and .DOCX)
@kingsleyudenewu
kingsleyudenewu / csv_to_array.php
Created May 27, 2016 09:06 — forked from jaywilliams/csv_to_array.php
Convert a comma separated file into an associated array.
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
CREATE TABLE `snippet` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` text,
`snippet` text,
`tags` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `search` (`title`,`description`,`snippet`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
@kingsleyudenewu
kingsleyudenewu / oop.js
Created April 28, 2016 08:38 — forked from eddmann/oop.js
OOP in JavaScript
// Prototypical Model
var UserPrototype = {};
UserPrototype.constructor = function(name)
{
this._name = name;
};
UserPrototype.getName = function()
{
return this._name;
@kingsleyudenewu
kingsleyudenewu / SecureSessionHandler.php
Created April 28, 2016 08:28 — forked from eddmann/SecureSessionHandler.php
Secure session handler implementation.
<?php
class SecureSessionHandler extends SessionHandler {
protected $key, $name, $cookie;
public function __construct($key, $name = 'MY_SESSION', $cookie = [])
{
$this->key = $key;
$this->name = $name;