Skip to content

Instantly share code, notes, and snippets.

View jaidhyani's full-sized avatar

Jai Dhyani jaidhyani

View GitHub Profile
@jaidhyani
jaidhyani / ethmine.sh
Last active September 19, 2022 08:27
Ethereum mining script (for use with systemd)
#!/bin/bash
#requirements
# -nc
# -genoil's ethminer (https://github.com/Genoil/cpp-ethereum)
# a CUDA-compatable GPU
# this is obviously hacky and gross, uses hardcoded paths to personal dirs, etc
# but should be easily adaptable
ethminer="/home/jai/cpp-ethereum/build/ethminer/ethminer"
addr="0x000000000000000000000000000" #REPLACE WITH YOUR ETHEREUM ADDRESS
# this is a script to dynamically update a route53 dns record to point to the
# IP address that the machine that is running on
# before running it, you'll want to create an IAM user with the following policy
# attched, replacing YOURZONEID with the zone ID of the domain you're going to be
# updating in route53.
# IAM policy:
"""
{
"Version": "2012-10-17",
"Statement": [
@jaidhyani
jaidhyani / ethprice.py
Last active June 7, 2017 22:20
Watch the price of ETH from the terminal/tmux status bar
#!/usr/bin/env python3.5
import requests
import locale
locale.setlocale(locale.LC_ALL, '')
price = requests.get(
'https://coinmarketcap-nexuist.rhcloud.com/api/eth'
).json()['price']['usd']

Keybase proof

I hereby claim:

  • I am jaibot on github.
  • I am jai (https://keybase.io/jai) on keybase.
  • I have a public key whose fingerprint is C7A7 3373 A4AE 5585 73AC 355D 26A2 A940 AA8E 35F8

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am jaibot on github.
  • I am jai (https://keybase.io/jai) on keybase.
  • I have a public key ASB6aBmgf7GH9-GEL5dQRXiLXfwoA8UtgYcgaL3HdbLJhwo

To claim this, I am signing this object:

@jaidhyani
jaidhyani / bmi.ipynb
Created March 9, 2016 02:16
BMI Analysis IPython Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am jaibot on github.
  • I am jai (https://keybase.io/jai) on keybase.
  • I have a public key whose fingerprint is B337 0211 35A6 FA51 3BC9 5A4B ED35 1267 5387 8DA4

To claim this, I am signing this object:

@jaidhyani
jaidhyani / gist:639430
Created October 21, 2010 21:49
Hyperoperators
(defn h ( [n] (cond
(= n 1) +
:else ( fn
( [ & x] (
reduce
( fn ([a,b] (
reduce
( f (- n 1) )
(repeat b a) ) ) )
x