Skip to content

Instantly share code, notes, and snippets.

Elixir, React, Phoenix, Rust.

Anders Ytterström madr

Elixir, React, Phoenix, Rust.
View GitHub Profile
View bookmarket.js
/*jslint indent: 2, devel: true, browser: true */
(function () {
"use strict";
function scrape(stopAt, startAt) {
var iframe = document.createElement("iframe"),
games = [],
heroes = {},
wins = 0,
page = 1,
madr / gist:aab7ef174eec894d5c34
Created May 7, 2014
example github webhook post
View gist:aab7ef174eec894d5c34
"ref": "refs/heads/master",
"after": "7d97f223924e0c7440680892cefdb2d97ff662a3",
"before": "ae249ec5c919d54f76c700178061652ed65286de",
"created": false,
"deleted": false,
"forced": false,
"compare": "",
"commits": [
View html5-geolocation-pos2px.html
<!DOCTYPE html>
<meta charset="utf-8">
body { margin: 0; }
div { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: red; }
<img src="mupp2.png" alt="" width="2500" height="2500">
<div hidden></div>
/*jslint browser: true */
madr / Makefile
Created Sep 1, 2014
Automated Wordpress FTP deployment using composer
View Makefile
composer install
composer update
php vendor/bin/deployment deployment.ini
php vendor/bin/deployment deployment.ini --test
View gradient-with-stop.scss
@mixin gradient-stopped ($fromcolor, $tocolor, $stop) {
background-color: $tocolor;
background-image: -moz-linear-gradient(180deg, $fromcolor, $tocolor $stop, $tocolor);
background-image: -ms-linear-gradient(top, bottom, $fromcolor, $tocolor $stop, $tocolor);
background-image: -webkit-linear-gradient(top, bottom, $fromcolor, $tocolor $stop, $tocolor);
background-image: linear-gradient(180deg, $fromcolor, $tocolor $stop, $tocolor);
madr / random.js
Last active Aug 29, 2015
Comparison of getting random values in different languages
View random.js
(function () {
"use strict";
var v, bandMembers = ["Hansi", "Andre", "Marcus", "Thomen"];
// 1. one random number between 1 and 10
v = Math.ceil(Math.random() * 10);
// 2: one random member of Blind Guardian
v = bandMembers[Math.ceil(Math.random() * (bandMembers.length - 1))];
View feedly.js
var titles = [], urls = [], rows = document.querySelectorAll("#section0_column0 > div"), i = rows.length, lastI = i; while (i--) { titles.push(rows[i].getAttribute("data-title")); urls.push(rows[i].getAttribute("data-alternate-link")); } titles = (t, i) { return "[" + t + "][" + (i + 1) + "] \nskriv nåt bra här\n"; } ); console.log(titles.join("\n")); urls = (u, i) { return "[" + (i + 1) + "]: " + u; }); console.log(urls.join("\n"));
View gist:fb56c0091759a7c2003f


Härmed deklarerar jag (Förnamn Efternamn, personnummer) att jag med beklagande härmed säger upp min anställning som X på företaget Y.

Jag har uppskattat min tid på företaget och hoppas att även ni har uppskattat mitt hårda arbete, men nu söker jag mig mot nya äventyr och utmaningar.

Jag säger upp mig med enlighet av min uppsägningstid på Z, bla bla bla.

Tack for gott samarbete.

madr /
Created Apr 19, 2015
Heroes of the Storm on Elementary Freya

So you want to run Diablo III on Linux? Hopefully this general installation guide helps some of you into doing that.

Why write this up?

Well, in the past there have been several threads that popped up about running the game on linux. Some of them were just that they couldn't get the program to run and others were heavily distorted graphics, like in the launcher, which made things unplayable. Since Blizzard doesn't support linux then it is left up to the users to find help for their problems. While linux use is at all new highs in the consumer market making it on par with MacOS in terms of numbers the lack of a centralized forum for linux or any official support makes finding help hit or miss usually.

Hopefully this installation guide will help some of the people who want to play the game on linux but are having issues.

Lets get started!

View view.php
* view.php
* simple view class, template-based.
* @todo indent markup using tidy?
* $Rev$
* $Author$
* $Date$
You can’t perform that action at this time.