Skip to content

Instantly share code, notes, and snippets.

View depoulo's full-sized avatar

Paolo Priotto depoulo

  • ePages GmbH
  • Hamburg, Germany
  • 16:05 (UTC +01:00)
  • X @depoulo
View GitHub Profile
@depoulo
depoulo / JSunconf15notes.md
Last active August 29, 2015 14:19
JS Unconf 2015 notes
@depoulo
depoulo / gist:a03395c351ddbe277f9f
Created March 20, 2015 12:49
My boxstarter script
Set-StartScreenOptions -EnableBootToDesktop -EnableDesktopBackgroundOnStart -EnableShowStartOnActiveScreen -EnableShowAppsViewOnStartScreen -EnableSearchEverywhereInAppsView -EnableListDesktopAppsFirst
cinst 7zip.install
cinst classic-shell
cinst Console2
cinst curl
cinst dropbox
cinst fiddler4
cinst Firefox
cinst flashplayerplugin
@depoulo
depoulo / console-paste-styles.js
Last active May 22, 2017 14:14
Add CSS rules quickly from the browser JS console. Idea taken from http://davidwalsh.name/add-rules-stylesheets
(() => {
var style = document.createElement("style");
style.appendChild(document.createTextNode(""));
document.head.appendChild(style);
var rules = prompt('Paste CSS rules here');
var importStatements = (rules.split(';') || []).filter(s => s.startsWith('@import')).map(s => s + ';');
importStatements.forEach((importStatement, index) => style.sheet.insertRule(importStatement, index));
style.sheet.insertRule(`@media all{${rules}`, importStatements.length);
}())
@depoulo
depoulo / gif.php
Last active December 24, 2023 17:20
Get random gif from Giphy - might be against their TOS, please check yourself and use reasonably - I use it for our continuos integration status monitor, which of course is almost never red ;)
// get random image from Giphy
function getRandomGif($topic = 'fail') {
$data = file_get_contents("http://giphy.com/search/$topic");
preg_match_all('@href="/gifs/(.*?)"@', $data, &$matches);
$gifId = $matches[1][array_rand($matches[1])];
return "http://media2.giphy.com/media/$gifId/giphy.gif";
}
@depoulo
depoulo / dabblet.css
Created February 26, 2014 09:27
Attempt for Essen & Trinken small stage teasers
/**
* Attempt for Essen & Trinken small stage teasers
*/
* { padding: 0; margin: 0; }
body { padding: 2%; max-width: 25em; font-family: Verdana; } a { color: black; text-decoration: none; }
.left { float: left; }
.right { float: right; }
.left, .right {
@depoulo
depoulo / dabblet.css
Created December 1, 2013 12:41
What exactly do you mean by "dotted"?
/**
* What exactly do you mean by "dotted"?
*/
i {
border-width: 10px;
border-color: peachpuff;
border-style: dotted;
border-radius: 150px;
@depoulo
depoulo / dabblet.css
Created July 15, 2013 09:47
What exactly do you mean by "dotted"?
/**
* What exactly do you mean by "dotted"?
*/
i {
border-width: 10px;
border-color: peachpuff;
border-style: dotted;
border-radius: 150px;
@depoulo
depoulo / dabblet.css
Created July 15, 2013 07:31 — forked from LeaVerou/dabblet.css
CSS Puzzle: Reverse the z-order of the <li>s without setting a separate z-index on each one in a way that works in IE9 and up
/**
* CSS Puzzle: Reverse the z-order of the <li>s without setting a separate z-index on each one in a way that works in IE9 and up
*/
li {
list-style: none;
display: inline-block;
padding: 1em 2em 1em 1em;
border: 1px solid rgba(0,0,0,.3);
border-radius: 0 999px 999px 0;
@depoulo
depoulo / gist:5832073
Last active July 30, 2021 02:31
CSS-only multi-line ellipsis with generated content. License: http://www.wtfpl.net/txt/copying/
@import "compass/css3/images";
// CSS-only multi-line ellipsis with generated content
// yields `position:relative`, so remember to declare an eventual `position:absolute/fixed` *after* including this mixin
@mixin limitLines(
$maxLinesPortrait, // Mandatory: The number of lines after which the clipping should take action.
$maxLinesLandscape: $maxLinesPortrait, // You may provide a different line limit for landscape orientation.
// Note that 'portrait' is our default orientation. However, if you omit $maxLinesLandscape,
// the value of $maxLinesPortrait is used for whatever orientation (that is, without a media query).