Skip to content

Instantly share code, notes, and snippets.

@Melindrea
Melindrea / keybase.md
Created March 7, 2014 20:07
Keybase Identify

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:

@Melindrea
Melindrea / Dependencies.md
Created July 22, 2014 11:57
Assemble Gallery

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

Project organization

Here is how I prefer to organize projects:

┌─ _dist/
├─ assets/
├─ content/
├─ data/
@Melindrea
Melindrea / Assemblefile
Last active August 29, 2015 14:19
Errors in plugin
// 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'));
});
@Melindrea
Melindrea / README.md
Last active December 4, 2015 17:10 — forked from renchap/README.md
One-line certificate generation/renews with Letsencrypt and nginx

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 / smaty-se.conf
Created November 19, 2015 23:45
let's encrypt setup
server {
server_name www.smaty.se;
# Server ports
listen 80;
listen 443 ssl http2;
listen [::]:80;
listen [::]:443 ssl http2;
# SSL Certificate
@Melindrea
Melindrea / .gitconfig
Created January 29, 2016 14:02 — forked from timdorr/.gitconfig
.gitconfig aliases
[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 / assemblefile.js
Created February 12, 2016 17:27
The assemblefile
'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'),