I hereby claim:
- I am z-hao-wang on github.
- I am haowang (https://keybase.io/haowang) on keybase.
- I have a public key ASBly6BMsIWxVdBgCrGK8md6_uzwqdFktNKAz9uSIdxcBAo
To claim this, I am signing this object:
| #!/bin/bash | |
| function validate_network() { | |
| if [[ "$1" != "mainnet" && "$1" != "mumbai" ]]; then | |
| echo "Invalid network input. Please enter 'mainnet' or 'mumbai'." | |
| exit 1 | |
| fi | |
| } | |
| function validate_client() { |
| ### INSTALL CUDA DRIVERS | |
| sudo rm /etc/apt/sources.list.d/cuda* | |
| sudo apt remove nvidia-cuda-toolkit | |
| sudo apt remove nvidia-* | |
| sudo apt update | |
| sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | |
| sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list' | |
| sudo apt update | |
| sudo apt install nvidia-driver-410 | |
| sudo apt install cuda-10-0 |
| import * as WebSocket from 'ws'; | |
| import * as EventEmitter from 'events'; | |
| // credit to https://github.com/websockets/ws/wiki/Websocket-client-implementation-for-auto-reconnect | |
| class WebSocketClient extends EventEmitter{ | |
| private number = 0; // Message number | |
| private autoReconnectInterval = 5 * 1000; // ms | |
| private url: string = ''; | |
| private instance: WebSocket | null = null; |
| const git = require('nodegit-kit'); | |
| const { exec } = require('child_process'); | |
| async function getCurrentBranchName() { | |
| return new Promise(resolve => { | |
| exec('git branch | grep \\*', function(err, stdout, stderr) { | |
| resolve(stdout.replace('* ', '')); | |
| }); | |
| }); | |
| } |
| //Usage: create a bookmark (add page) in chrome. title type "ATT Bill", URL: paste content below. | |
| //Login to att.com, go to your bills and make sure you can view wireless bill details. click on the bookmark. | |
| javascript:(function(){for(var allData=$(".faux-table-cell").map(function(a,t){return $(t).text()}),sharedCostFields=["Unlimited Plus Multi Line"],map={},maxAmount=0,sharedCosts=0,output="",i=0;i<allData.length;i++){var row=allData[i];if(row.match(/\d\d\d-\d\d\d-\d\d\d\d/)){var amount=allData[i+1].replace(/\$/,"");map[row]={amount:parseFloat(amount)},amount>maxAmount&&(maxAmount=parseFloat(amount))}for(var j=0;j<sharedCostFields.length;j++)if(row.indexOf(sharedCostFields[j])>-1){var sharedCost=allData[i+1].replace(/\$/,"");sharedCosts+=parseFloat(sharedCost),output+="sharedCost "+row.trim()+": "+sharedCost.trim()+"\n"}}var size=Object.keys(map).length,sharedCostPerLine=sharedCosts/size,total=0;for(var key in map)map[key].amount===maxAmount&&(map[key].amount-=sharedCosts),map[key].amount+=sharedCostPerLine |
| var values=document.getElementsByClassName('pad-r-xxxxs-sm'); | |
| var nums = []; | |
| for (let i = 0; i < values.length; i++) { | |
| nums.push(parseFloat(values[i].innerText.substring(1))) | |
| } | |
| const total = 8 | |
| let sharedIndex = 1; // todo : adjust this if there is late fee | |
| let shared = nums[sharedIndex]; | |
| console.error(`shared: ${shared}`) |
I hereby claim:
To claim this, I am signing this object:
| // In URSA | |
| var crt = ursa.createPublicKeyFromComponents(new Buffer(publicKey.n, 'hex'), new Buffer(publicKey.e, 'hex')); | |
| var textToEncrypt = 'sampleText'; | |
| var encryptedCipher = crt.encrypt(textToEncrypt, 'utf8', 'base64', DEFAULT_RSA_PADDING); | |
| // In react-native | |
| // convert a base64 string to hex | |
| function b64tohex(s) { |