Skip to content

Instantly share code, notes, and snippets.

View codemasher's full-sized avatar
🏳️‍🌈

smiley codemasher

🏳️‍🌈
View GitHub Profile
@codemasher
codemasher / mumblelink.php
Last active October 17, 2021 22:22
Guild Wars 2 Mumble link stuff
@codemasher
codemasher / spotify-apidoc-scraper.js
Last active March 23, 2021 09:32
API Doc Scraper: Endpoint Maps
/**
* Quickly scrape the API endpoints from the documentation.
* Open the browser console and drop the code there. Copy the JSON from the console. enjoy!
*
* @link https://developer.spotify.com/documentation/web-api/reference/
*
* @created 21.03.2021
* @author @codemasher
* @copyright 2021 @codemasher
* @license MIT
@codemasher
codemasher / prototype-cors.js
Last active July 4, 2018 15:24
Enable CORS for prototype.js and get rid of the message "Refused to get unsafe header X-JSON"
/**
* Enable CORS for prototype.js and get rid of the message "Refused to get unsafe header X-JSON"
* play with it: http://jsfiddle.net/Ajx2k/11/
*
* Created by Smiley <@codemasher> on 11.01.14.
*/
// Enable CORS for Prototype: http://kourge.net/node/131
// With this, the console will still tell you: Refused to get unsafe header "X-JSON"
Ajax.Responders.register({
@codemasher
codemasher / LICENSE.txt
Created November 8, 2017 17:54 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@codemasher
codemasher / gitter-fixes.css
Created July 28, 2016 19:09
embed fixes for gitter.im
/* limit embed height and align left */
.embed {
height: inherit;
max-height: 640px;
overflow: inherit;
position: initial;
}
/* don't stretch code blocks over the whole screen */
pre code {
/**
* Created by Smiley on 19.06.2016.
*/
/**
* Class GW2GeoJSON
*/
class GW2GeoJSON{
/**
<?php
function x(){$t=time();$f=mktime(date('H',$t),date('i',$t),date('s',$t),date('m',$t),1,date('Y',$t));$z=date('w',$f);$s=$z===0?6:$z-1;$c=date('D j M Y H:i:s', $t).chr(10);for($w=0,$y=$s*-1;$w<ceil(($s+date('t',$f))/7);$w++){$c.=date('W',$f+$w*604800).' ';for($d=0; $d<7; $d++,$y++){$c.=date('d',$f+$y*86400).' ';}$c.=chr(10);}$c.=chr(10);return $c;}echo x();
@codemasher
codemasher / twitter-fixes.css
Last active January 3, 2016 17:19
Some little tweaks for the new Twitter web layout... (WIP)
.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);
<?php
/**
* gw2staticmaps.php
* created: 26.09.13
*/
function max_zoom($continent_id){
return $continent_id === 1 ? 7 : 6;
}
@codemasher
codemasher / gw2-forum-fluid.css
Last active December 19, 2015 02:38
Fluid Layout CSS Hack for the official Guild Wars 2 Forums
/*
* Fluid Layout CSS Hack for the official Guild Wars 2 Forums
*
*
* This stylesheet will override the forums default style and set it to a fluid full width layout
* with increased font sizes for better readability at high resolutions.
* It will also fix a few quirks like the unusable language links on the top and margins around smileys,
* increases the size of editor textareas and hides the e-mail address in the forums overall header.
* (if you ever happen to make screenshots on the forums)
*