Skip to content

Instantly share code, notes, and snippets.

View arshbot's full-sized avatar
🖥️
11100010 10011010 10100001

Harsha Goli arshbot

🖥️
11100010 10011010 10100001
View GitHub Profile
@arshbot
arshbot / pugbomb.py
Last active February 7, 2017 16:37
Dynamic pugbomb for chatbot's in python. Uses reddit api
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Created by Harsha Goli
#Remember to register your script with reddit at https://ssl.reddit.com/prefs/apps
#You will use those credentials and input them in the praw.Reddit() parameters. Your script will fail otherwise.
import praw
#pug bombs the chat and destroys this poor bot's soul
def pugbomb(response, args):
@arshbot
arshbot / gitcommits.py
Created February 12, 2017 18:36
Get all git commits for all your public and private repositories
import requests
from requests.auth import HTTPBasicAuth
list_of_repos = []
fork_score, star_score, commit_score = (0,)*3
#Note, you cannot get ALL commits a user has ever made. What this script does is iterate through a user's local repositories
#and count how many git commits have been made and how many times a repository of yours has been forked or starred
def compile_raw_gitscore(username='arshbot'):
get_user_repos(username)
@arshbot
arshbot / executeRequest.swift
Created September 13, 2017 00:38
How to execute http request in swift
/*
PARAMS
URL - url of server + method wrapped in URL
httpMethod - For example: "GET", "POST", "PUT", "DELETE" etc
postData - body in string form. Be sure to include and escape quotations for string keys
auth - String key, string value dictionary. Should have "username" key and "password" key, will fail if not present
headers - header for request
completionHandler - block that is to be executed on the response. Block has three optional parameters of type Data, URLResponse, Error.
Returns void
var bip39 = require('bip39');
var hdkey = require('hdkey');
var createHash = require('create-hash');
var btcLib = require('bitcoinjs-lib');
var bs58check = require('bs58check');
//const mnemonic = bip39.generateMnemonic(); //generates string
const mnemonic = "gentle mutual speak consider mandate kingdom cash explain soul exile cabin squeeze";
const seed = bip39.mnemonicToSeed(mnemonic); //creates seed buffer
console.log('Seed: ' + seed);

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

testnet=1
server=1
txindex=1
maxconnections=10
rpcuser=REPLACEME
rpcpassword=REPLACEME
minrelaytxfee=0.00000000
incrementalrelayfee=0.00000010
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333
@arshbot
arshbot / lndreadme.txt
Created November 20, 2018 22:07
LND Installation & Running instructions
Mac install & start instructions
1. $ brew install go
2. $ export PATH=$PATH:$(go env GOPATH)/bin
3. $ https://bitcoin.org/en/download
4. $ echo testnet=1 >> Library/Application\ Support/Bitcoin/bitcoin.conf
Start bitcoin-qt and wait for it to sync
5. $ go get -d github.com/lightningnetwork/lnd
6. $ cd $GOPATH/src/github.com/lightningnetwork/lnd
from time import sleep
import requests, os
import sys
url = "https://us-east-api.grinmint.com/v1/user/mining+miner1@thesis.co/dashboard"
print("")
while(True):
sleep(1)
@arshbot
arshbot / Pipfile
Created September 13, 2019 21:26
Stripe integration demo
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
stripe = "*"
requests = "*"
@arshbot
arshbot / gist:0f4a350da60261b5925e83f7aeeb938f
Last active July 12, 2021 16:33
building and running lnd quickly, see modified dockerfile
docker-compose build && docker-compose run --entrypoint "make itest icase=psbt" lnd
~~dev.DOCKERFILE~~
# If you change this value, please change it in the following files as well:
# /.travis.yml
# /Dockerfile
# /make/builder.Dockerfile
# /.github/workflows/main.yml
# /.github/workflows/release.yml
FROM golang:1.16.3-alpine as builder