3 hidden CSS tips
1. Use empty-cells to style table empty cells:
Surprisingly the browser support is quite good and extends back to IE8. Convenient to give less visual predominance to empty cells.
table {
empty-cells: hide;
}
<?php | |
/** | |
* A simple php script to generate random CSS colors at each request. | |
*/ | |
$hsl = rand(0, 240) . ',' . rand(50, 80) . '%,60%'; | |
?> | |
<style type="text/css"> | |
a { | |
color: hsl(<?php echo $hsl ?>); |
{% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %} | |
<h2 class="title" id="{{year}}">{{year}}</h2> | |
<ul class="year"> | |
{% for article in date_year %} | |
<li> | |
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a> | |
<time datetime="{{ article.date.isoformat() }}" pubdate>{{ article.locale_date }}</time> | |
</li> | |
{% endfor %} | |
</ul> |
A warning occurred (42 apples) | |
An error occurred |
import hashlib as hasher | |
import datetime as date | |
# Define what a Snakecoin block is | |
class Block: | |
def __init__(self, index, timestamp, data, previous_hash): | |
self.index = index | |
self.timestamp = timestamp | |
self.data = data | |
self.previous_hash = previous_hash |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Ampersand</title> | |
<style> | |
@font-face { | |
font-family:"Goudy Bookletter 1911"; | |
src:url('http://themes.googleusercontent.com/static/fonts/goudybookletter1911/v3/l5lwlGTN3pEY5Bf-rQEuIHkY3soKkPv_thL__S829Cw.eot#iefix') format('embedded-opentype'), |
.git
folder to appsGIT_DIR
and GIT_WORK_TREE
environment variables to containers<?php | |
class BasicTwigExtension extends \Twig_Extension { | |
/** | |
* Internal Twig function for getting extension name. | |
* | |
* @return string | |
*/ | |
public function getName() { | |
return 'BasicTwigExtension'; |
#!/usr/bin/env sh | |
# Link good as of June 2018 | |
# Download lists, unpack and filter, write to stdout | |
curl -s https://www.iblocklist.com/lists.php \ | |
| sed -n "s/.*value='\(http:.*\?list=.*\)'.*/\1/p" \ | |
| xargs wget -O - \ | |
| gunzip \ | |
| egrep -v '^#' |