Skip to content

Instantly share code, notes, and snippets.

View rithvikvibhu's full-sized avatar

Rithvik Vibhu rithvikvibhu

View GitHub Profile
@rithvikvibhu
rithvikvibhu / missing-blind-bids.js
Last active June 20, 2023 18:56
missing-blind-bids.js
const { WalletClient } = require('hs-client');
const { Network } = require('hsd');
// Edit these:
const NETWORK = 'main';
const API_KEY = 'apikey';
const WALLET_NAME = 'walletname';
/** @type {import('hsd/lib/protocol/network')} */
// Based on: https://gist.github.com/pinheadmz/b51a6ee3c1b414bd7d053951b83f6162
// USAGE: hsd --log-console=false --plugins=/path/to/this/file/shakedex-scan-plugin.js
'use strict';
const layout = require('hsd/lib/blockchain/layout');
const TXMeta = require('hsd/lib/primitives/txmeta');
const { LOCKTIME_FLAG } = require('hsd/lib/protocol/consensus');
These nodes have been online on both 1st June 2022 and 9th June 2022 and are likely to stay online for a longer time:
107.152.32.250
107.152.33.71
129.153.177.220
129.213.167.123
138.197.52.107
139.59.211.187
140.238.196.136
142.132.235.25
@rithvikvibhu
rithvikvibhu / create-open-bid-reveal.js
Created August 27, 2021 18:58
Pre-signed OPEN, BID, REVEAL transactions
/**
* Generate pre-signed OPEN, BID, REVEAL transactions
*
* TX 1 (immediately broadcast):
* 1 (or more) coin (100 HNS) -----> OPEN name/ (0 HNS)
* \----> addr2 (lockup value = 70.1)
* \----> change (29.9 HNS - fee)
*
* TX 2 (broadcast in BIDDING period):
* addr2 (70.1 HNS) -----> BID name/ (70)
@rithvikvibhu
rithvikvibhu / LICENSE
Last active May 5, 2024 08:43
Get tokens for Google Home Foyer API
MIT License
Copyright (c) 2020 Rithvik Vibhu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@rithvikvibhu
rithvikvibhu / README.md
Last active April 12, 2024 15:32
GHLocalApi Update

GHLocalApi Update

The Gist

Until recently, the Google Home app used to communicate with the device over port 8008 (HTTP) and did not require any authentication. Everything in the unofficial documentation worked as expected.

A few days (weeks) ago, Google pushed a new update to all GH devices and all endpoints (except /setup/eureka_info) started returning 403 (forbidden) errors. The app had switched over to port 8443 and HTTPS.

@rithvikvibhu
rithvikvibhu / entrarcanteen.js
Created January 14, 2018 07:32
Greasemonkey script to inject link into Entrar
// ==UserScript==
// @name DPS Canteen for Entrar
// @version 1
// @include https://entrar.in/*
// @grant none
// ==/UserScript==
// Get admission number
var admid = document.getElementById("welcome-user").innerText.split('\n')[2].replace('/', '')

Keybase proof

I hereby claim:

  • I am rithvikvibhu on github.
  • I am rithvikvibhu (https://keybase.io/rithvikvibhu) on keybase.
  • I have a public key whose fingerprint is 0393 D763 6C08 EFA8 A781 F9CD E851 01DF 1682 E27F

To claim this, I am signing this object:

@rithvikvibhu
rithvikvibhu / server-log
Created January 16, 2017 14:52
Feathers server debug log
socket.io-parser decoded 22["foods::get","5877783b2aa1cc1c04a0c1e3",{}] as {"type":2,"nsp":"/","id":2,"data":["foods::get","5877783b2aa1cc1c04a0c1e3",{}]} +47ms
socket.io:socket got packet {"type":2,"nsp":"/","id":2,"data":["foods::get","5877783b2aa1cc1c04a0c1e3",{}]} +48ms
socket.io:socket emitting event ["foods::get","5877783b2aa1cc1c04a0c1e3",{}] +0ms
socket.io:socket attaching ack callback to event +0ms
socket.io:socket dispatching an event ["foods::get","5877783b2aa1cc1c04a0c1e3",{},null] +0ms
feathers-socket-commons:methods Got 'foods::get' event with connection +0ms { provider: 'socketio',
user:
{ email: 'a@a.aa',
password: '$2a$10$5zufdjXThNFf38k..s/x8unwuciO/EJP2fet0VAy6erO9ulptBB62',
_id: 'Ws2fg5IzolYDKgJc' },
@rithvikvibhu
rithvikvibhu / app.js
Created January 16, 2017 14:41
Feathers socket auth - Server side
const path = require('path');
const serveStatic = require('feathers').static;
const favicon = require('serve-favicon');
const compress = require('compression');
const cors = require('cors');
const feathers = require('feathers');
const configuration = require('feathers-configuration');
const hooks = require('feathers-hooks');
const rest = require('feathers-rest');
const bodyParser = require('body-parser');