Skip to content

Instantly share code, notes, and snippets.

View CarbonAlabel's full-sized avatar
🗄️
Organizing

Carbon Alabel CarbonAlabel

🗄️
Organizing
View GitHub Profile
@client_id = ***
@client_secret = ***
@code_challenge = ***
@code_verifier = ***
##############################
# New grant (standard flow v2)
POST https://login.eveonline.com/v2/oauth/token
Content-Type: application/x-www-form-urlencoded
Authorization: Basic {{client_id}} {{client_secret}}
@CarbonAlabel
CarbonAlabel / pkce_utility.js
Last active June 14, 2019 09:31
Utility functions for implementing a PKCE authorization flow in browsers.
// Utility functions
function base64url_encode(string) {
return btoa(string).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
}
function base64url_decode(string) {
return atob(string.replace(/-/g, "+").replace(/_/g, "/"));
}
function random_string(bytes) {
@CarbonAlabel
CarbonAlabel / esi_all_scopes.js
Created May 29, 2019 13:40
Bookmarklet (source) for selecting all scopes in the auth dialog at https://esi.evetech.net/ui/
document.querySelectorAll("div.auth-container input[type='checkbox']").forEach(e => e.click());
document.querySelector("div.auth-container button.authorize").click();
import dateutil.parser
lines = []
for line in open("changelog.md").read().split("\n"):
lines.append("# " + str(dateutil.parser.parse(line[1:]).date()) if line and line[0] == "#" else line)
open("changelog.md", "w").write("\n".join(lines))
@CarbonAlabel
CarbonAlabel / scope_search.js
Last active August 25, 2018 22:10
EVE Developers scope search box bookmarklet (source)
document.head.appendChild(document.createElement("style")).innerHTML = ".scopeSearchHidden{display:none !important}" +
".scopeSearchInput{width:270px;display:block;padding:1px;border:1px solid #ccc;border-bottom:0;border-radius:3px 3px 0 0;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);}" +
".scopeMultiClick{width:270px;display:block;padding:1px;border:1px solid #ccc;border-top:0;border-radius:0 0 3px 3px;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);}" +
".ms-container .ms-list{margin-bottom:0 !important;border-radius:0 !important;}";
const scopeSearch = (s, e) => {
e.querySelectorAll("li").forEach(e => e.innerText.indexOf(s) > -1 ? e.classList.remove("scopeSearchHidden") : e.classList.add("scopeSearchHidden"));
};
const clickAll = (e) => {
e.querySelectorAll("li").forEach(e => {