Skip to content

Instantly share code, notes, and snippets.

View uneasyguy's full-sized avatar

Jeff Bingaman uneasyguy

View GitHub Profile
#OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
#!/bin/bash
sudo apt-get update ##update package list
sudo apt-get upgrade -y ##install newest packages, y flag assumes your answer is yes on any prompts
sudo apt-get install wget ##installl wget to download sample pdf
for package in python3-pip nodejs npm ##install nodejs, node package manager and python package manager
do
sudo apt install $package -y
done
#!/usr/bin/env python3
from subprocess import check_output
from crontab import CronTab
import os
def replace_text(filename,find,replace):
with open(filename, 'r') as file :
filedata = file.read()
filedata = filedata.replace(find, replace)
from flask import Flask,jsonify,send_from_directory
from flask_restful import Api,Resource,reqparse
import werkzeug
from PyPDF2 import PdfFileMerger
import os
app = Flask(__name__)
app.config["CLIENT_PDF"] = '/home/****USERNAME GOES HERE****/appscript/'
api = Api(app)
#!/bin/sh
sudo /usr/local/lib/node_modules/forever/bin/forever restartall
#!/bin/sh
/usr/local/bin/forever start -s --minUptime 1000 --spinSleepTime 1000 -c python3 ~/appscript/merge_app.py
from binance_data import DataClient
if __name__ == '__main__':
pair_list = DataClient().get_binance_pairs()
store_data = DataClient().kline_data(pair_list,'4h',start_date='01/01/2019',end_date='10/10/2019',storage=['csv','binance_data'],progress_statements=True)
<?php
/**
* General overview output for HTML pages.
*
* @package query-monitor
*/
class QM_Output_Html_Overview extends QM_Output_Html {
public function __construct( QM_Collector $collector ) {
@uneasyguy
uneasyguy / testing.py
Created July 18, 2019 20:45
server version of testing.py from https://youtu.be/i2qnM_S1vh4
import requests
symbols = ['STRATBTC','OMGBTC','BTCUSDT']
something_else = 'hello world'
query_string = str(symbols)+'&'+something_else
url = f'http://****public ip goes here****:5000/symbols/{query_string}'
r = requests.get(url)
data = r.json()
print (data)
@uneasyguy
uneasyguy / app.py
Created July 18, 2019 20:44
Server version of app.py from https://youtu.be/i2qnM_S1vh4
from flask import Flask
from flask_restful import Api,Resource
from binance.client import Client
app = Flask(__name__)
api = Api(app)
class Prices(Resource):
def get(self,symbols,something_else):
client = Client(None,None)