Skip to content

Instantly share code, notes, and snippets.

View vyatri's full-sized avatar
:electron:
work remotely from anywhere

Juanita Vyatri vyatri

:electron:
work remotely from anywhere
View GitHub Profile
@vyatri
vyatri / app.js
Last active January 3, 2018 01:02 — forked from minhnc/app.js
var win = Ti.UI.createWindow(); //
win.open();
/// <<< Register & UnRegister Event Listeners
/**
* params: {event: 'event', callback: eventCallback}
*/
function registerEventListener(obj, params) {
if ( typeof obj._eventListeners == 'undefined' ) {
@vyatri
vyatri / bcrypt.php
Created August 25, 2011 08:50 — forked from rk/bcrypt.php
Simple bcrypt object to wrap crypt() with.
<?php
// Originally by Andrew Moore
// Src: http://stackoverflow.com/questions/4795385/how-do-you-use-bcrypt-for-hashing-passwords-in-php/6337021#6337021
//
// Heavily modified by Robert Kosek, from data at php.net/crypt
class Bcrypt {
private $rounds;
private $prefix;