Skip to content

Instantly share code, notes, and snippets.

Learning Elixir, Discovering Phoenix

Anders Ytterström madr

Learning Elixir, Discovering Phoenix
Block or report user

Report or block madr

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
madr / original-simplified.css
Last active Aug 29, 2015
OOCSS grids, flexbox edition
View original-simplified.css
.line {
overflow: hidden;
.unit {
float: left;
box-sizing: border-box;
.size1of1 { float: none; }
View gist:4a99074b8855236aa8f9
for (var i = 0, max = json.length; i < max; i++) {
selectElm.innerHTML += "<option value='" +json["id"] + "'>" + json["foretag"] + "</option>";
madr /
Last active Aug 29, 2015
Contrast check: determine foreground color
based on:
accepts hex colors with 3 or 6 chars. hash-char is optional.
def get_contrast_yiq(hex_color):
hex_color = hex_color.replace("#", "")
if len(hex_color) == 3:
hex_color = "".join([c + c for c in hex_color])
View view.php
* view.php
* simple view class, template-based.
* @todo indent markup using tidy?
* $Rev$
* $Author$
* $Date$
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 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.

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"));
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 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 / 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
You can’t perform that action at this time.