Skip to content

Instantly share code, notes, and snippets.

🏳️‍🌈
.

smiley codemasher

🏳️‍🌈
.
Block or report user

Report or block codemasher

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@codemasher
codemasher / mumblelink.php
Last active Oct 15, 2019
Guild Wars 2 Mumble link stuff
View mumblelink.php
@codemasher
codemasher / constants.php
Created Jan 9, 2018
class constant access
View constants.php
<?php
/**
* @created 09.01.2018
* @author Smiley <smiley@chillerlan.net>
* @copyright 2018 Smiley
* @license MIT
*/
namespace Example;
@codemasher
codemasher / trait-returntype.php
Created Jan 9, 2018
change return types in trait method overrides
View trait-returntype.php
<?php
/**
* @created 09.01.2018
* @author Smiley <smiley@chillerlan.net>
* @copyright 2018 Smiley
* @license MIT
*/
namespace Example;
@codemasher
codemasher / LICENSE.txt
Created Nov 8, 2017 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
View LICENSE.txt
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 Jul 28, 2016
embed fixes for gitter.im
View gitter-fixes.css
/* 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 {
View gw2-geojson.js
/**
* Created by Smiley on 19.06.2016.
*/
/**
* Class GW2GeoJSON
*/
class GW2GeoJSON{
/**
View calendar-code-golf.php
<?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();
View guildemblems.php
<?php
/**
*
*/
// some settings
$config['path_background'] = 'img/background/'; // trailing slash!
$config['path_foreground'] = 'img/foreground/';
$config['path_cache'] = 'img/cache/';
$config['path_cacert'] = 'cert/cacert.pem';
View .htaccess
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /oauth2/
#loop stopper
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]
RewriteRule ^callback$ index.php [L]
@codemasher
codemasher / chatlink.class.php
Created Feb 10, 2015
A simple GW2 chatlink class with support for IDs > 16 bit
View chatlink.class.php
You can’t perform that action at this time.