Skip to content

Instantly share code, notes, and snippets.

View assemblefile.js
'use strict';
var path = require('path'),
merge = require('mixin-deep'),
extname = require('gulp-extname'),
permalinks = require('assemble-permalinks'),
getDest = require('./plugins/get-dest'),
viewEvents = require('./plugins/view-events'),
git = require('gulp-git'),
bump = require('gulp-bump'),
@Melindrea
Melindrea / .gitconfig
Created Jan 29, 2016 — forked from timdorr/.gitconfig
.gitconfig aliases
View .gitconfig
[alias]
st = status -sb
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
up = !git fetch origin && git rebase origin/master
mup = !git fetch origin && git merge origin/master
done = "!git checkout master && git pull && git fetch -p && git branch --merged | grep -Pv '\\*|master' | xargs -n 1 git branch -d"
@Melindrea
Melindrea / smaty-se.conf
Created Nov 19, 2015
let's encrypt setup
View smaty-se.conf
server {
server_name www.smaty.se;
# Server ports
listen 80;
listen 443 ssl http2;
listen [::]:80;
listen [::]:443 ssl http2;
# SSL Certificate
@Melindrea
Melindrea / README.md
Last active Dec 4, 2015 — forked from renchap/README.md
One-line certificate generation/renews with Letsencrypt and nginx
View README.md

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {
@Melindrea
Melindrea / Assemblefile
Last active Aug 29, 2015
Errors in plugin
View Assemblefile
// Removed everything that doesn't have to do with this specific thing
var assemble = require('assemble'),
bufferPages = require('./pages.js');
assemble.task('buffer', function () {
assemble.src('*.md')
.pipe(bufferPages())
.pipe(assemble.dest('data'));
});
View projects.md

Project organization

Here is how I prefer to organize projects:

┌─ _dist/
├─ assets/
├─ content/
├─ data/
View Dependencies.md

Bower

bower install --save-dev magnific-popup

The script I've gone with is magnific-popup by Dmitri Semonov

Figure out for yourself how you're getting it onto your pages, since that'll be based on your workflow.

NPM

npm install --save-dev handlebars-helpers

@Melindrea
Melindrea / keybase.md
Created Mar 7, 2014
Keybase Identify
View keybase.md

Keybase proof

I hereby claim:

  • I am Melindrea on github.
  • I am Melindrea (https://keybase.io/Melindrea) on keybase.
  • I have a public key whose fingerprint is F355 7836 9E71 10DB B0BA 25EA 48BE 226F 7DE0 2745

To claim this, I am signing this object:

View gist:9090606

When my grandmother was young, her parents Alma and Olof Frid (which, yes, is where I got Vendela's surname from), had foster children at least occasionally.

One such child was a little girl whose mother had died (I don't know where the father was). The little girl was getting sicker, and at one point my grand-aunt was babysitting the child. She fell asleep, and when she woke up a woman dressed in white was leaning over the cradle. The woman picked up the child and walked away. My grand-aunt rushed over to the cradle. The child was dead.

Sometime later, my grand-aunt saw a photo of a young woman. She recognized the woman in the picture as the one she'd seen and asked who it was. That was the child's mother.

This is used in my story as something that Vendela's grandmother Elis tells her happened to her. The child in that story is a boy named Antonius, which is Olof Frid's middlename. As another touch of curiosa: Elis is named from my paternal grandfather's great-aunt. The farm that Vendela grew up on is lo

View gist:9077709
- Next!
- Hello there.
- Is today tomorrow in New Zealand?
- Yes.
- Foot same length Europe
- What?
- Inch same length Europe