Skip to content

Instantly share code, notes, and snippets.

View Arefu's full-sized avatar
🤔
ERROR_FILE_NOT_FOUND

Johnathon Arefu

🤔
ERROR_FILE_NOT_FOUND
View GitHub Profile
@Arefu
Arefu / Street Stop Search.json
Created September 7, 2018 01:37
API Example: Street Stop Search
{
"displayFieldName": "ProjectName",
"fieldAliases": {
"PlatformName": "PlatformName",
"RouteNos": "RouteNos",
"PlatformNo": "PlatformNo",
"PlatformTag": "PlatformTag",
"RoadName": "RoadName",
"BearingToRoad": "BearingToRoad"
},
@Arefu
Arefu / Platform Information.json
Created September 7, 2018 01:56
API Example: Getting Bus Information Via PlatformNo
{
"displayFieldName": "ProjectName",
"fieldAliases": {
"PlatformName": "PlatformName",
"RouteNos": "RouteNos",
"PlatformNo": null,
"PlatformTag": "PlatformTag",
"RoadName": null,
"BearingToRoad": null
},
@Arefu
Arefu / RTI Update.json
Created September 7, 2018 02:14
API Example: Arrival Information Update
[
{
"PlatformName": "Bus Interchange (Platform B)",
"RouteNumber": "17",
"RouteName": "Bryndwr/Huntsbury",
"Destination": "Huntsbury",
"ETA": "17"
},
{
"PlatformName": "Bus Interchange (Platform B)",

Metro Info - Unofficial API

Hello, I am writing this guide to showcase what Metro Info use on their Next Bus service. They publish an offical API which can be found here, however I found this API to be to annoying to work with, also the fact that it returns all data in a SQLXML format made it really hard for me to justify working with, so instead here I am publishing my findings of their "private" one.

API Enpoints

I only know of 3 endpoints that get all the information I wanted from the service, there may be more, but I will only cover these 3. The base URL is: http://m.metroinfo.co.nz/" all 3 enpoints are appended to this URL and all requests should be and can only be made by using a POST request. More information on this will be detailed below

RUCKUS ZoneDirector Info - Unoffical API

Hello again, hopefully after reading this you'll be able to understand how RUCKUS ZoneDirector does certain things under the hood. I will cover 4 things in this little Gist, first of all I will show you how to authenticate using PowerShell and keep the session stored. As a base for this guide I will be using this writeup so be sure to read that for the details I will surely miss out on mentioning. This is for a basic SysAdmin who wants to let users do certain things with ZoneDirector without having to give any control of the actual system itself.

Authenticating Against ZoneDirector

Since in my enviroment we use a valid SSL certificate you may or may not need to add this simple hack to the top of your PowerShell.

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}

@Arefu
Arefu / SpiceWorks.ps1
Created December 11, 2018 01:50
SpiceWorks API Access
[CmdletBinding()]
Param(
[string] $url = "http://{SERVER}/pro_users/login",
[string] $username = "{Email}",
[string] $password = '{Password}'
)
$userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0"
$headers = @{"Accept"="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; "Accept-Encoding"="gzip, deflate"; "Accept-Language"="en-US,en;q=0.5";}
$r = Invoke-WebRequest ($url) -SessionVariable session -UserAgent $userAgent -Headers $headers
@Arefu
Arefu / CoolRomsInstantDownload.js
Last active January 10, 2019 00:56
A UserScript that lets you download from CoolRoms.com faster then waiting the 100 seconds.
// ==UserScript==
// @name Portal Roms Instant Downloader
// @version 1
// @grant none
// @description No Wait Times For Portal Roms.
// @include http://www.portalroms.com/*
// ==/UserScript==
//This was only tested on the PS2 page, it should work on the other pages assuming they follow the same scheme.
var DownloadLink = "http://www.portalroms.com/torrents/"
@Arefu
Arefu / Install.md
Last active April 30, 2024 01:04
Install XNA On VS2019

Step One

Read this

Step Two

Put this instead.

<Installation InstalledByMsi="false">
    <InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.VSWinDesktopExpress" />
    <InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Pro" />
 
@Arefu
Arefu / pkmneclipse AutoClicker
Created January 23, 2019 04:53
Tested on GreaseMonkey on FireFox.
// ==UserScript==
// @name Pokemon Eclipse RPG AutoFinder
// @version 1
// @grant none
// @description No Wait Times For Portal Roms.
// @include https://pkmneclipse.net/*
// ==/UserScript==
window.onload = function () {
function AutoClick()
{
@Arefu
Arefu / FreeHerald.js
Last active June 11, 2021 08:44
Make NZ Herald premium articles free to view
// ==UserScript==
// @name Free NZHerald
// @include *nzherald.co.nz*
// @version 1
// @description Freedom of information is more important than any amount of money
// @author Arefu (Johnathon)
// @grant none
// ==/UserScript==
//I've tested this on FireFox with Tampermonkey. I hate Herald and everything they stand for, they steal articles and don't give credit, they have biased journalism and just generally crappy reporters.
//This is for all the articles they stole from Reddit and Facebook without due credit and copy pasting any clickbait websites like BuzzFeed.