Skip to content

Instantly share code, notes, and snippets.

Avatar

Madhusoodan Pataki mmpataki

View GitHub Profile
View AadharDetailsStory.js
class AadharDetailsStory {
constructor(args) { this.args = args; }
title() { return "Enter your Aadhar ID" }
moral() { return { ...this.args, aadharid: this.aadharid.value } }
async isCompleted() { return this.aadharid.value && this.aadharid.value.length == 12 }
getQuestions() { return "Enter a valid aadhar id" }
nextStoryName() { return OTPVerifyStory }
preDestroy() { this.status.innerText = 'validating aadhar details...'; return new Promise(res => setTimeout(() => res(), 1000)) }
tell() {
return render('aadhar', {
View render.js
function render(name, spec, elemCreated, container) {
let e;
if (!spec.preBuilt) {
e = document.createElement(spec.ele);
spec.iden && elemCreated(spec.iden, e)
if (spec.text) e.innerHTML = spec.text;
if (spec.classList) {
e.classList = `${name}-` + spec.classList.split(/\s+/).join(` ${name}-`)
}
spec.attribs && Object.keys(spec.attribs).forEach(key => {
View storyteller.html
<html>
<body>
<style>
.storyboard-content { padding: 10px; }
.storyboard-titlebar { padding: 10px 0px; }
.storyboard-errmsg { color: red; }
.storyboard-title { font-weight: bolder; font-size: 1.1em; }
input, select { display: block; margin: 5px 10px; padding: 5px; min-width: 200px; }
button { padding: 5px 10px; margin-right: 10px; }
@mmpataki
mmpataki / test.ipynb
Last active Jan 4, 2021
a ipynb test
View test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View novpn.py
import signal
import subprocess
from fbchat import Client
from fbchat.models import *
user = "F1_user_email"
passwd = "F1_user_password"
recvFrom = "F2_user_id"
client = None
@mmpataki
mmpataki / MyAgent.java
Last active Aug 27, 2020
Blog: JVM agents and JIT
View MyAgent.java
package com.mmp.jvmtiperf;
import javax.crypto.spec.*;
import java.lang.instrument.Instrumentation;
import java.security.spec.*;
import java.util.Base64;
import javax.crypto.*;
public class MyAgent {