Skip to content

Instantly share code, notes, and snippets.

Jeff Reifman newscloud

Block or report user

Report or block newscloud

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@newscloud
newscloud / index.html
Created Jul 21, 2018
Multi-series charting demo from ProgammableWeb coinlayer cryptocurrency API introduction
View index.html
<html lang="en">
<head>
<!-- replace mine with your insert your favorite jquery source -->
<script src="http://localhost:8888/mp/assets/c19d41b1/jquery.js"></script>
<!-- end note -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
@newscloud
newscloud / keybase.md
Created Mar 27, 2015
My Keybase gist to verify my github account
View keybase.md

Keybase proof

I hereby claim:

  • I am newscloud on github.
  • I am jeffreifman (https://keybase.io/jeffreifman) on keybase.
  • I have a public key whose fingerprint is 4D3E 6456 A60E 3C14 D960 3FE2 6011 E858 FC97 F62D

To claim this, I am signing this object:

@newscloud
newscloud / gist:8393857
Created Jan 13, 2014
Code to encrypt and store salted usernames and passwords in PHP using MCrypt from http://jeffreifman.com/filtered-open-source-imap-mail-filtering-software-for-php/
View gist:8393857
public function createCredentials($username,$password) {
$salt = $this->random_string(4,4).'::'.$this->random_string(4,4);
$salts = explode('::',$salt);
$str = $salts[0].'::'.$username.'::'.$password.'::'.$salts[1];
$td = mcrypt_module_open('tripledes', '', 'ecb', '');
$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
$account_salt = Yii::app()->params['account_salt']; // stored in your ini file somewhere on your server
mcrypt_generic_init($td, $account_salt, $iv);
$encrypted_data = mcrypt_generic($td, $str);
mcrypt_generic_deinit($td);
View Lots of text
wow
wow
wow
wow
wow
wow
wow
wow
You can’t perform that action at this time.