Skip to content

Instantly share code, notes, and snippets.

View AntonTrollback's full-sized avatar
💭
Conspiring

Anton Trollbäck AntonTrollback

💭
Conspiring
View GitHub Profile
@AntonTrollback
AntonTrollback / index.js
Created October 9, 2017 15:26
requirebin sketch
const html = require('bel');
const labelTexts = [
"Fin de la|Pobreza",
'Hambre|Cero',
'Salud|y Bienestar',
'Educatión|de Calidad',
'Igualdad|de Género',
'Agua Limpia|y Saneamiento',
'Energía Asequible|y No Contaminante',
@AntonTrollback
AntonTrollback / fix-safari-svg-use.js
Created September 7, 2015 10:01
Fix Safari issue where svg <use> might not display in unless forced to rerender at page load
var els = document.getElementsByTagName('use');
Array.prototype.forEach.call(els, function(el) {
el.setAttribute('xlink:href', el.getAttribute('xlink:href'));
});
@AntonTrollback
AntonTrollback / logga.php
Last active April 12, 2016 16:44
log php to browser console
function logga() {
echo '<script>console.log(';
foreach (func_get_args() as $index => $arg) {
$type = gettype($arg);
if ($type === 'boolean') {
$arg = $arg ? 'true' : 'false';
} elseif ($type === 'string') {
$arg = '"' . $arg . '"';
@AntonTrollback
AntonTrollback / flex-utils.css
Created February 17, 2015 10:08
Suitcss Flex utilities
/**
* Note: `min-height` flex container won't apply to its flex items in IE 10-11
* More info: http://git.io/NbmO
* Can be targeted with selector hack: http://git.io/Nbqx
*/
.u-flex {
display: flex;
}
/* Icon */
.icon {
display: block;
width: 32px;
height: 32px;
margin: 50px;
border-radius: 3px;
background: CornflowerBlue;
@AntonTrollback
AntonTrollback / index.css
Last active March 7, 2016 15:53
Helper for styling tabbed focus states: html.tabbing a:focus { }
a {
color: rebeccapurple;
text-decoration: none;
outline: 0;
}
a:hover,
a:active {
color: rebeccapurple;
text-decoration: underline;
/*
* Expanding border
* Inspired by Scorekeeper - youtu.be/sXqXpwyBI1k
*/
.btn {
position: relative;
display: block;
width: 100px;
height: 100px;