Skip to content

Instantly share code, notes, and snippets.

@PhilippLgh
PhilippLgh / CheckPassword.js
Last active May 11, 2021 07:42
Password Verification on Ethereum
const { BrainWallet } = require("@ethersproject/experimental");
const createKey = async (password, progressCallback = () => { }) => {
let project = "Rise of the Shadow Monkey"
const brainWallet = BrainWallet.generate(project, password, progressCallback);
return brainWallet
}
const tryUserPassword = async (answer) => {
// construct signer from answer
{
"grid": {
"version": "1.0.0"
},
"plugins": [
{
"name": "swarm",
"displayName": "Swarm",
"type": "storage",
"author": {
@PhilippLgh
PhilippLgh / Bot.js
Created April 18, 2016 13:15
A Telegram Speech-To-Text bot that uses Watson
var Bot = require('node-telegram-bot-api')
var watson = require('watson-developer-cloud');
var request = require('request');
var config = require('./config');
var speech_to_text = watson.speech_to_text({
username: config.watson.username,
password: config.watson.password,
version: 'v1',
url: 'https://stream.watsonplatform.net/speech-to-text/api'
@PhilippLgh
PhilippLgh / App.js
Last active April 19, 2019 17:51
Ethereum Grid Wallet Starter
import React, { Component } from 'react';
import './App.css';
import { AccountItem, CreateAccount } from 'ethereum-react-components'
class App extends Component {
state = {
geth: undefined,
connected: false,
error: '',

Keybase proof

I hereby claim:

  • I am philipplgh on github.
  • I am philipplgh (https://keybase.io/philipplgh) on keybase.
  • I have a public key ASAA7Dzc6NalWpKUCNEhGSLn_qKKKH6hYji9MUWRBYUWWAo

To claim this, I am signing this object:

@PhilippLgh
PhilippLgh / PermissionsHelper
Last active April 10, 2016 13:42
Android Bootstrap
/**
* Created by Philipp on 3/3/2016.
* handles new permission system on marshmallow
* see http://developer.android.com/intl/zh-cn/training/permissions/requesting.html
*/
public class PermissionsHelper {
private Activity getActivityContext(){
return BaseApp.getCurrentActivity()