Skip to content

Instantly share code, notes, and snippets.

View gdhhdg's full-sized avatar
:octocat:
Robo-blogging

Gunner gdhhdg

:octocat:
Robo-blogging
View GitHub Profile
@gdhhdg
gdhhdg / gist:525a463a91c8f0ff2d2b33b23eedb67e
Created June 2, 2020 12:02
Use AspnetRoles in ASP.NET Core 3
//this should be the ConfigureServices in Startup.cs
//It'll let you use built in User Roles
public void ConfigureServices(IServiceCollection services)
{
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(
Configuration.GetConnectionString("DefaultConnection")));
services.AddIdentity<IdentityUser, IdentityRole>(
@gdhhdg
gdhhdg / craigslist_cities.py
Created May 17, 2019 10:50
List of all US craigslist cities and links.
city_list = [['abilene, TX', 'https://abilene.craigslist.org/'], ['akron / canton', 'https://akroncanton.craigslist.org/'], ['albany, GA', 'https://albanyga.craigslist.org/'], ['albany, NY', 'https://albany.craigslist.org/'], ['albuquerque', 'https://albuquerque.craigslist.org/'], ['altoona-johnstown', 'https://altoona.craigslist.org/'], ['amarillo, TX', 'https://amarillo.craigslist.org/'], ['ames, IA', 'https://ames.craigslist.org/'], ['anchorage / mat-su', 'https://anchorage.craigslist.org/'], ['annapolis, MD', 'https://annapolis.craigslist.org/'], ['ann arbor, MI', 'https://annarbor.craigslist.org/'], ['appleton-oshkosh-FDL', 'https://appleton.craigslist.org/'], ['asheville, NC', 'https://asheville.craigslist.org/'], ['ashtabula, OH', 'https://ashtabula.craigslist.org/'], ['athens, GA', 'https://athensga.craigslist.org/'], ['athens, OH', 'https://athensohio.craigslist.org/'], ['atlanta, GA', 'https://atlanta.craigslist.org/'], ['auburn, AL', 'https://auburn.craigslist.org/'], ['augusta, GA', 'https://augus
abilene, TX
akron / canton
albany, GA
albany, NY
albuquerque
altoona-johnstown
amarillo, TX
ames, IA
anchorage / mat-su
annapolis, MD
@gdhhdg
gdhhdg / trade.js
Last active October 5, 2022 14:07
Binance API non-trade functions for the binance-api-node NPM package.Set as exports to use in your application.
/**
* Created by gunnerhatmaker on 4/26/19.
*/
const config = require('./config');
const Binance = require('binance-api-node').default;
// Authenticated client, can make signed calls
const client = Binance({
apiKey: config.config.APIKEY,
apiSecret: config.config.APISECRET,
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var mongoose = require('mongoose');
var mongodb = require('mongodb');
var index = require('./routes/index');
var users = require('./routes/users');