Skip to content

Instantly share code, notes, and snippets.

View darthmaim's full-sized avatar
🤘
 ¯\_(ツ)_/¯

darthmaim darthmaim

🤘
 ¯\_(ツ)_/¯
View GitHub Profile
@darthmaim
darthmaim / gw2treasures.com.md
Created May 11, 2020 15:29
gw2treasures.com Rewrite

gw2treasures.com Rewrite

I want to start a complete rewrite of gw2treasures.com. In this post I want to outline the reasons for the rewrite and what requirements/features/… I want for the new version.

Current Situation

At the end of 2012 I wrote a bot for the german Guild Wars2 Wiki with a website to review all edits my bot made. When the official Guild Wars 2 API was released on May 14th 2013 I added a list of items to this website with some basic search tools. This list was used to help me and other wiki editors with creating pages for all items.

item list on the gw2wbot website

@darthmaim
darthmaim / event.js
Created August 20, 2015 09:27
Trigger native javascript event
function triggerNativeEvent( element, eventName ) {
// check if element is a jQuery object
if( element instanceof $ ) {
element = element[0];
}
// trigger event
if( element.dispatchEvent ) {
var event = document.createEvent( 'Events' );
event.initEvent( eventName, true, false );
@darthmaim
darthmaim / v2
Last active August 23, 2021 11:30
Tracks changes of https://api.guildwars2.com/v2 (hourly)
** Public API v2 **
Usage:
The API follows the general pattern of enumerating possible values of the
subsequent path segment, with the fully qualified path yielding a json object
of the type being enumerated.
For example, /v2/colors will yield:
[1, 2, 3, ... ]
<?php
namespace GW2Treasures\GW2Api\OAuth;
use OAuth\Common\Http\Exception\TokenResponseException;
use OAuth\Common\Http\Uri\Uri;
use OAuth\OAuth2\Service\AbstractService;
use OAuth\OAuth2\Token\StdOAuth2Token;
class GuildWarsOAuth2Service extends AbstractService {
@darthmaim
darthmaim / onResize.js
Created October 27, 2014 08:13
onResize
var onResize = (function() {
var resizeCallbacks = [];
var requestedAnimationFrame = false;
var supportsRequestedAnimationFrame = "function" === typeof window.requestAnimationFrame;
var lastHeight = elements.window.height(),
lastWidth = elements.window.width();
var runCallbacks = function() {
var callbackLength = resizeCallbacks.length;
.global-nav-inner {
background: rgba(0,0,0,0.75);
}
.modal-overlay, .profile-header-mask, .grid-overlay, .gallery-overlay {
background: rgba(0,0,0,0.8);
}
.home-tweet-box {
background: rgba(255,255,255,1.0);