Skip to content

Instantly share code, notes, and snippets.

View EMCP's full-sized avatar
💭
moved to Gitlab

Erik EMCP

💭
moved to Gitlab
View GitHub Profile
@EMCP
EMCP / Utils.kt
Created November 12, 2019 22:00 — forked from BDOMDev/Utils.kt
fun getSecretKey(sharedPref: SharedPreferences): SecretKey {
val key = sharedPref.getString(AppConstants.secretKeyPref, null)
if (key == null) {
//generate secure random
val secretKey = generateSecretKey()
saveSecretKey(sharedPref, secretKey!!)
return secretKey
}
@EMCP
EMCP / Utils.kt
Created November 12, 2019 22:00 — forked from BDOMDev/Utils.kt
fun getSecretKey(sharedPref: SharedPreferences): SecretKey {
val key = sharedPref.getString(AppConstants.secretKeyPref, null)
if (key == null) {
//generate secure random
val secretKey = generateSecreKey()
saveSecretKey(sharedPref, secretKey!!)
return secretKey
}
@EMCP
EMCP / automobile.ipynb
Created August 2, 2017 11:16 — forked from martinwicke/automobile.ipynb
Estimator demo using Automobile dataset
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EMCP
EMCP / gist:7667707
Created November 26, 2013 22:47 — forked from boucher/gist:1750375
<?php
require 'path-to-Stripe.php';
$error = '';
$success = '';
if ($_POST) {
Stripe::setApiKey("YOUR-API-KEY");
try {
if (!isset($_POST['stripeToken']))