Blog Spot!


Be Awesome in PHPStorm

Laracasts series.

Think about how many hours each week you spend within your editor. Doesn't it make sense to unlock every inch of its capabilities? I certainly subscribe to that idea! Why don't you come along, and I'll teach you everything I know about PHPStorm.

Added on 23.Jan.2015
Tags: php phpstorm ide

Encrypt Large Messages with Asymmetric Keys and phpseclib

This tutorial will show you how to encrypt arbitrarily large messages with asymmetric keys and a PHP library called phpseclib.

Introduction

Most of us understand the need to encrypt sensitive data before transmitting it. Encryption is the process of translating plaintext (i.e. normal data) into ciphertext (i.e. secret data). During encryption, plaintext information is translated to ciphertext using a key and an algorithm. To read the data, the ciphertext must be decrypted (i.e. translated back to plaintext) using a key and an algorithm.

An encryption algorithm is a series of mathematical operations applied to the numerical value(s) of the key and the numerical values of the characters in a string of plaintext. The results are the ciphertext. The larger the key, the more secure the ciphertext.

A core problem to be solved with any encryption algorithm is key distribution. How do you transmit keys to those who need them in order to establish secure communication?

The solution to the problem depends on the nature of the keys and algorithms.

There are two basic types of encryption algorithms:

  1. Symmetric Algorithms that use the same key for both encryption and decryption.
  2. Asymmetric Algorithms that use different keys for encryption and decryption.

Read the full article

Added on 22.Jan.2015
Tags: php encryption algorithm sitepoint

How to Install PHP Redis on Ubuntu

First, if you don’t have it installed already, let’s install Redis:

sudo apt-get install redis-server

After we get Redis installed (and/or verified that it was installed), we can install the PHP module for Redis:

sudo apt-get install php5-redis

After the module is done installing, you will want to restart your webserver and/or process manager (php-fpm, spawncgi, et cetera). Once you’ve restarted, you can check phpinfo() for a new section labeled Redis.

In addition to the Redis interface, you will also gain the ability to use Redis as a save handler. For more information you can check out my post on using Redis as a PHP Session Handler.

Tested on Ubuntu 14.04 LTS

Added on 21.Jan.2015
Tags: php redis nosql ubuntu

Introduction to sessionStorage, JavaScript Session

Usage:

The sessionStorage object has five methods:

  • getItem(key) – retrieves the value for the given key or null if the key doesn’t exist.
  • setItem(key, value) – sets the value for the given key.
  • removeItem(key) – removes the key completely.
  • key(position) – returns the key for the value in the given numeric position.
  • clear() – removes all key-value pairs.

There is also a single property, length, which indicates how many key-value pairs are currently stored in sessionStorage. Some example usage:

//save a value
sessionStorage.setItem("name", "Nicholas");

//retrieve item
var name = sessionStorage.getItem("name");

//get the key name for the first item
var key = sessionStorage.key(0);

//remove the key
sessionStorage.removeItem(key);

//check how many key-value pairs are present
var count = sessionStorage.length;

Additionally, proper implementations allow you to read, write, and remove values from sessionStorage as if it were a regular object. For example:

//save a value
sessionStorage.name = "Nicholas";

//retrieve item
var name = sessionStorage.name;

//remove the key
delete sessionStorage.name;

Full Article

Added on 06.Jan.2015
Tags: js session storage

Up and Running with Raspberry Pi

Watch the Online Video Course Up and Running with Raspberry Pi

Time: ( 55m 22s )

Topics include:

  • Buying a Raspberry Pi
  • Connecting hardware
  • Installing the Raspbian OS
  • Working with frequently used Linux commands
  • Setting up VNC to control the Raspberry Pi remotely
  • Playing a sound
  • Building a simple webcam website
  • Controlling a device with GPIO in Python

UP & Running with Raspberry PI

Added on 28.Dec.2014
Tags: lynda raspberry pi

Search


PHP Libraries


Carbon lib / docs
Idiorm lib / docs
Image Workshop lib / docs
lorenzos/Minixed lib / docs
Parsedown lib / docs
PHP Paginator lib / docs
PHP Redis lib / docs
QrCode lib / docs
Requests lib / docs
Slim lib / docs
Spyc lib / docs
TWIG lib / docs
Upload lib / docs
Validation lib / docs
Zebra Image lib / docs

JS Libraries


AJV lib / docs
BackboneJS lib / docs
Bootstrap Notify lib / docs
C3.js lib / docs
ChartJS lib / docs
FastMD5 lib / docs
HighlightJS lib / docs
jQuery-Storage lib / docs
JS-Cookie lib / docs
Leaflet JS lib / docs
LowDB lib / docs
Marked lib / docs
NeedlyJS lib / docs
ParcelJS lib / docs
RequireJS lib / docs
Swig lib / docs
Toastr lib / docs
Underscore lib / docs
ValidateJS lib / docs
top