to retrieve data to sen to cloud9 server use "ctx.toDataURL()"
toDatUrl will return a base64 of IMG
then convert base64 to a blob to send over webdav
https://github.com/jseidelin/pixastic/blob/master/pixastic.js
// Example useage at the bottom | |
async function generateTOTP(username, secret, issuer, rotation, digits) { | |
let totp = () => { | |
return new Promise((resolve) => { | |
let counter = TOTP.getCurrentCounter(rotation); | |
TOTP.otp(secret, counter, digits, (cb) => { | |
resolve(cb); | |
}); | |
}); | |
}; |
module.exports = function(pwd, extra) { | |
var forge = require("node-forge"); | |
forge.options.usePureJavaScript = true; | |
var EC = require('elliptic').ec; | |
return new Promise((resolve, reject) => { | |
var ec_p256 = new EC('p256'); | |
if (!pwd) |
// Allows to call a Android java function asynchronously | |
// spawn long running computations/io on the Java/Android without blocking the JS/Website running inside the WebView | |
// Eg. const result = await callAndroidAsync('javaFunction', { param1: 'value1', param2: 'value2' }) | |
// Please give a star if you find this useful | |
export async function callAndroidAsync(javaFuncName, params) { | |
const rand = 'asyncJava_' + Math.floor(Math.random() * 1000000) | |
window[rand] = {} | |
// func called from android |
var bitHex = 8; | |
//idea is that when a pub key gets created, the user stores this int32 in its profile. | |
//then when you go to fetch the list of pubkeys, hash the key and also fetch the int32 from the profile | |
//compair the alias + int32 and show the user profile(s) to the requesting user for decision | |
//when user has decided save the pubkey and any other meta data you wish | |
var sha256_toint_test = "something like a publickey that has a reference of the output int32"; |
# wget -qO- https://goo.gl/HBY9jh | sh | |
wget http://www.webmin.com/download/deb/webmin-current.deb -O webmin.deb | |
sudo apt-get update | |
sudo apt-get install perl libnet-ssleay-perl libauthen-pam-perl libio-pty-perl apt-show-versions -y | |
sudo dpkg -i webmin.deb | |
sudo apt-get -f install -y | |
rm -rf webmin.deb |
.clearfix { | |
*zoom: 1; | |
} | |
.clearfix:before, | |
.clearfix:after { | |
display: table; | |
line-height: 0; | |
content: ""; | |
} |
to retrieve data to sen to cloud9 server use "ctx.toDataURL()"
toDatUrl will return a base64 of IMG
then convert base64 to a blob to send over webdav
https://github.com/jseidelin/pixastic/blob/master/pixastic.js
/** | |
* Session Storage for multi servers ex.Heroku stacks | |
* for expressjs socket.io with databases redis and mongodb | |
* (redis/socket.io) | |
* (mongodb/expressjs) | |
* | |
* Bradley Matusiak @ 2012 bmatusiak@gmail.com | |
* | |
* ref:bunch of searches from google | |
**/ |
SlaveClass 1constructor lol | |
SlaveClass 2constructor lol | |
SlaveClass 3constructor lol | |
SlaveClass v1.3 | |
SlaveClass a | |
SlaveClass b | |
SlaveClass c | |
{} |