Skip to content

Instantly share code, notes, and snippets.

View fuzzysteve's full-sized avatar
💭
Building shit

Steve Anderson / Steve Ronuken fuzzysteve

💭
Building shit
View GitHub Profile
from requests.auth import HTTPBasicAuth
import requests
import json
import time
auth=HTTPBasicAuth('firstbitgoeshere', 'secondbitgoeshere')
baseurl="https://api.dnspark.com/v2/dns/"
@fuzzysteve
fuzzysteve / gist:10647593
Last active August 14, 2017 23:48
skill levels - Eve online
Style 1 : 1 row per type. multiple skills in each row.
select typeid, max(skill1) skill1,max(skill1level) skill1level,max(skill2) skill2,max(skill2level) skill2level,max(skill3) skill3,max(skill3level) skill3level,max(skill4) skill4,max(skill4level) skill4level,max(skill5) skill5,max(skill5level) skill5level,max(skill6) skill6,max(skill6level) skill6level from
(
select typeid,coalesce(valueint,valuefloat,0) skill1,0 skill1level,0 skill2,0 skill2level,0 skill3,0 skill3level,0 skill4,0 skill4level,0 skill5,0 skill5level,0 skill6,0 skill6level from dgmTypeAttributes where attributeID=182
union
select typeid,0 skill1,0 skill1level,coalesce(valueint,valuefloat,0) skill2,0 skill2level,0 skill3,0 skill3level,0 skill4,0 skill4level,0 skill5,0 skill5level,0 skill6,0 skill6level from dgmTypeAttributes where attributeID=183
union
select typeid,0 skill1,0 skill1level,0 skill2,0 skill2level,coalesce(valueint,valuefloat,0) skill3,0 skill3level,0 skill4,0 skill4level,0 skill5,0 skill5level,0 skill6,0 skill6level from
3 13692 Jin'taan
32 12858 Suitonia
14 12667 The Judge
45 9353 Steve Ronuken
29 9237 Sullen Decimus
16 8551 rhiload Feron-drake
25 8122 Innominate
51 7852 Dancul1001
7 7479 Yukiko Kami
53 7095 Aryth
@fuzzysteve
fuzzysteve / gist:ca0e30a2f9388384705c548074cc214b
Created May 3, 2017 17:43
linear weighting. position 1 is worth 10 votes, position 10 is worth 1
3 124910 Jin'taan
32 117452 Suitonia
14 115639 The Judge
45 86364 Steve Ronuken
29 83680 Sullen Decimus
16 78109 rhiload Feron-drake
25 73778 Innominate
51 71117 Dancul1001
53 68836 Aryth
7 68104 Yukiko Kami
@fuzzysteve
fuzzysteve / gist:5dacc6c34238ed142eda51b319b30da1
Created September 29, 2016 09:48
Office 365 password expiry email
# Please Configure the following variables....
$smtpServer="###########SMTP SERVER GOES HERE###########"
$expireindays = 10
$from = "############EMAIL GOES HERE##############"
$logging = "Enabled" # Set to Disabled to Disable Logging
$logFile = "c:\scripts\logs\o365passwordreminder.csv" # ie. c:\mylog.csv
$date = Get-Date -format ddMMyyyy
#
###################################################################################################################
@fuzzysteve
fuzzysteve / gist:820cd2573d87a1d20d87
Created February 18, 2015 11:56
Google sheets stuff, using CREST
/*
Doesn't currently do anything other than dump some region information into the log.
Uses https://github.com/googlesamples/apps-script-oauth2
Details for the setup of that are on the page. short version:
Add the library MswhXl8fVhTFUH_Q3UOJbXvxhMjh3Sh48 to your sheet code. Resources -> libraries
get the project key from file-> project properties
from sqlalchemy import create_engine, Column, MetaData, Table, Index
from sqlalchemy import Integer, String, Text, Float, Boolean, BigInteger, Numeric, SmallInteger, DateTime
import time
import requests
from requests_futures.sessions import FuturesSession
import requests_futures
from concurrent.futures import as_completed
import datetime
import csv
import time
@fuzzysteve
fuzzysteve / sqlitemarket.py
Created July 13, 2016 19:03
Sqlite loader
from sqlalchemy import create_engine, Column, MetaData, Table, Index
from sqlalchemy import Integer, String, Text, Float, Boolean, BigInteger, Numeric, SmallInteger, DateTime
import time
import requests
from requests_futures.sessions import FuturesSession
import requests_futures
from concurrent.futures import as_completed
import datetime
import csv
import time
DROP TABLE IF EXISTS `invVolumes`;
CREATE TABLE `invVolumes` (
`typeid` int(11) NOT NULL,
`volume` int(11) DEFAULT NULL,
PRIMARY KEY (`typeid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into invVolumes (typeid,volume) select typeid, 2500 from invTypes where groupid=324 ;
insert into invVolumes (typeid,volume) select typeid, 15000 from invTypes where groupid=1201 ;
insert into invVolumes (typeid,volume) select typeid, 15000 from invTypes where groupid=27 ;
207356 | Jita IV - Moon 4 - Caldari Navy Assembly Plant
113827 | Amarr VIII (Oris) - Emperor Family Academy
68836 | Dodixie IX - Moon 20 - Federation Navy Assembly Plant
45757 | Rens VI - Moon 8 - Brutor Tribe Treasury
41056 | Hek VIII - Moon 12 - Boundless Creation Factory
11556 | Saranen V - Moon 9 - Quafe Company Warehouse
10494 | O1Y-ED VII - Shop Only dock and clone At cita
8260 | Stacmon V - Moon 9 - Federation Navy Assembly Plant
7699 | TVN-FM X - TVNo Carriers Near Thera Holes
7407 | Tash-Murkon Prime II - Moon 1 - Kaalakiota Corporation Factory