Skip to content

Instantly share code, notes, and snippets.

Verifying that +sebstein is my blockchain ID. https://onename.com/sebstein
@steinsag
steinsag / s3BucketPolicyEncryptionSSL.json
Created June 11, 2014 12:03
S3 bucket policy to enforce encryption and https:// access
{
"Version": "2008-10-17",
"Id": "Policy-GENERATED-ID",
"Statement": [
{
"Sid": "DenyUnSecureCommunications",
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
@steinsag
steinsag / iamUserLimitS3Policy.json
Last active August 29, 2015 14:02
IAM User Policy to limit access to certain AWS S3 bucket
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt-GENERATED-ID",
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
@steinsag
steinsag / build-kbruch.sh
Created February 28, 2014 18:31
Build KDE's KBruch application
git clone git://anongit.kde.org/kbruch
cd kbruch
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=debugfull
make -j4
sudo make install
@steinsag
steinsag / darktable.c
Created May 17, 2013 21:23
Just a small snippet of Darktable's code to create a button for the preferences dialog.
g->description = GTK_ENTRY(gtk_entry_new());
gtk_box_pack_start(box, GTK_WIDGET(g->description), FALSE, FALSE, 0);
g_object_set(G_OBJECT(g->description), "tooltip-text", _("description or further information"), (char *)NULL);
@steinsag
steinsag / gradient.css
Created January 18, 2013 20:23
Some simple CSS to define a background gradient.
header nav {
position: relative;
border-top: 1px solid #73BBCF;
border-bottom: 1px solid #73BBCF;
}
header nav {
padding: 12px 0;
font-weight: bold;
font-size: 0.875em;
@steinsag
steinsag / grid-outbreak.html
Created January 18, 2013 20:14
While using a grid system, it is not possible to position elements outside the grid. However, one is not forced to use the grid for the whole page. You can have multiple grids on a single page.
<body>
<header>
<hgroup class="container">
...
</hgroup>
<nav class="row">
<ul class="container">
<li><a href="/about">Über mich</a></li>
<li>...</li>
@steinsag
steinsag / media_query.css
Created January 16, 2013 22:41
Simple media query to add a background image only on a certain minimum page width.
@media ( min-width : 768px ) {
#page_wrap hgroup {
background: #fff url('images/skyline.jpg') no-repeat right bottom;
min-height: 118px;
}
}
@steinsag
steinsag / index.css
Created January 15, 2013 21:22
Define page width, show horizontal navigation, and hide some headlines.
.container {
max-width: 980px;
}
nav h1, footer h1 {
display: none;
}
nav ul li, footer ul li {
display: inline;
@steinsag
steinsag / base.responsive.html
Created January 15, 2013 21:18
Base structure of a HTML5 page including responsive.gs classes to define rows and columns.
<body>
<div id="page_wrap" class="container row">
<header class="row">...</header>
<section id="content_wrap" class="row">
<section id="article_listing" class="col span_8">
<article class="row">...</article>
<article class="row">...</article>
</section>