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
@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: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
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 / checkSSL.py
Created December 1, 2017 10:05
python script to check SSL certs
import socket
import ssl
from ssl import CERT_OPTIONAL
import datetime
import logging
def ssl_cert_info(hostname):
ssl_date_fmt = r'%b %d %H:%M:%S %Y %Z'
context = ssl.create_default_context()
from requests.auth import HTTPBasicAuth
import requests
import json
import time
auth=HTTPBasicAuth('firstbitgoeshere', 'secondbitgoeshere')
baseurl="https://api.dnspark.com/v2/dns/"
@fuzzysteve
fuzzysteve / callback.php
Created November 11, 2018 12:41
basic discord
<?php
session_start();
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();

Keybase proof

I hereby claim:

  • I am fuzzysteve on github.
  • I am fuzzysteve (https://keybase.io/fuzzysteve) on keybase.
  • I have a public key ASCYnNQiwS_Lg2CqNj8Du_8BocVRuHkuTVb8fU-7y-2EPQo

To claim this, I am signing this object:

@fuzzysteve
fuzzysteve / gist:a1582580f650c608990ec823fe154134
Created June 16, 2019 23:04
Powerquery getting market type ids from a sheet.
let
Source = Json.Document(Web.Contents("https://market.fuzzwork.co.uk/aggregates/?region=10000002&types="&Text.Combine(Table.ToList(Table.TransformColumnTypes(Table.SelectRows(Excel.CurrentWorkbook(){[Name="typelist"]}[Content], each ([Column1] <> null)),{{"Column1", type text}})),","))),
#"Converted to Table" = Record.ToTable(Source),
#"Expanded Value" = Table.ExpandRecordColumn(#"Converted to Table", "Value", {"buy", "sell"}, {"Value.buy", "Value.sell"}),
#"Expanded Value.buy" = Table.ExpandRecordColumn(#"Expanded Value", "Value.buy", {"weightedAverage", "max", "min", "stddev", "median", "volume", "orderCount", "percentile"}, {"Value.buy.weightedAverage", "Value.buy.max", "Value.buy.min", "Value.buy.stddev", "Value.buy.median", "Value.buy.volume", "Value.buy.orderCount", "Value.buy.percentile"}),
#"Expanded Value.sell" = Table.ExpandRecordColumn(#"Expanded Value.buy", "Value.sell", {"weightedAverage", "max", "min", "stddev", "median", "volume", "orderCount", "percentile"}, {"Value.sell.
@fuzzysteve
fuzzysteve / editedwright.py
Last active June 25, 2019 18:01
editedwright.py
from collections import defaultdict
import sys
# --------
# - Read in the BLT file
# --------
fname = sys.argv[2]
fp = open(fname, "r")
@fuzzysteve
fuzzysteve / gist:eaef4434773f8e311e417f6c37a16fa8
Last active August 11, 2019 19:37
aggregate loader - powrshell.
let
Source = Binary.Decompress(Web.Contents("https://market.fuzzwork.co.uk/aggregatecsv.csv.gz"),Compression.GZip),
#"Imported CSV" = Csv.Document(Source,[Delimiter=",", Columns=10, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(#"Imported CSV", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"what", type text}, {"weightedaverage", type number}, {"maxval", type number}, {"minval", type number}, {"stddev", type number}, {"median", type number}, {"volume", Int64.Type}, {"numorders", Int64.Type}, {"fivepercent", type number}, {"orderSet", Int64.Type}})
in
#"Changed Type"