Skip to content

Instantly share code, notes, and snippets.

View zweizeichen's full-sized avatar

Sebastian zweizeichen

  • Germany
View GitHub Profile
@zweizeichen
zweizeichen / station.haml
Created October 3, 2012 12:03
Element43 margin script
- extends "base.haml"
- load cache
- load humanize
- block title
element43 - Station - Best Margins
- block content
%h1
{{station.name}}
.row-fluid
.span12
{
"active_orders": 1533121,
"archived_orders": 6014880,
"history_messages": 4365,
"history_records": 166062,
"new_orders": 4365,
"old_orders": 5483,
"typestats": {
"29668": {
"ask_avg": 642649016.641,
defmodule Yay do
def list_to_map([], map) do
map
end
def list_to_map(list, map) do
[key, value] = Enum.take(list, 2)
list_to_map(tl(tl(list)), Map.put(map, key, value))
end
end
@zweizeichen
zweizeichen / chrome.py
Last active June 8, 2017 05:17
Check your browsing history for sites using Cloudflare
import sqlite3
import tldextract
history_domains = set()
cf_domains = None
print("Loading domains from Chrome browsing history...")
# Copy history from ~/Library/Application Support/Google/Chrome/Default/History
conn = sqlite3.connect('History')
@zweizeichen
zweizeichen / tokenfetcher.py
Created September 12, 2017 11:48
ESI Token fetching script
# 1) Configure below
# 2) pip install esipy Flask
# 3) FLASK_APP=tokenfetcher.py flask run
# 4) Wait a couple of seconds for the browser to open
import webbrowser
from esipy import App
from esipy import EsiClient
from esipy import EsiSecurity
@zweizeichen
zweizeichen / Element43 API Information.sql
Last active January 27, 2022 15:44
API Info to get you started
-- ----------------------------
-- Records of "api_reftype"
-- ----------------------------
BEGIN;
INSERT INTO "api_reftype" VALUES ('117', '');
INSERT INTO "api_reftype" VALUES ('10014', 'District Contract Collateral');
INSERT INTO "api_reftype" VALUES ('10015', 'District Contract Collateral Refund');
INSERT INTO "api_reftype" VALUES ('10016', 'District Contract Reward');
INSERT INTO "api_reftype" VALUES ('10017', 'District Clone Transportation');
INSERT INTO "api_reftype" VALUES ('10018', 'District Clone Transportation Refund');