Skip to content

Instantly share code, notes, and snippets.

<?php
function alphaID($in, $to_num = false, $pad_up = false, $pass_key = null)
{
$out = '';
$index = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$base = strlen($index);
if ($pass_key !== null) {
for ($n = 0; $n < strlen($index); $n++) {
@iSaadSalman
iSaadSalman / readme.md
Created March 10, 2016 17:29 — forked from jobsamuel/readme.md
Run NodeJS as a Service on Ubuntu 14.04 LTS

Run NodeJS as a Service on Ubuntu 14.04 LTS

With Node you can write very fast JavaScript programs serverside. It's pretty easy to install Node, code your program, and run it. But > how do you make it run nicely in the background like a true server?

  • Go to /etc/init/
  • $ sudo vim yourapp.conf
  • Paste script.conf
  • $ sudo start yourapp
  • And when you wanna kill the process $ sudo stop yourapp