Skip to content

Instantly share code, notes, and snippets.

View DarrylDias's full-sized avatar
🎯
Focusing

Darryl Dias DarrylDias

🎯
Focusing
View GitHub Profile
@DarrylDias
DarrylDias / fancybox.rb
Created October 4, 2014 16:26
Fancybox plugin for MiniSoda/Jekyll/Octopress
# Fancybox plugin for MiniSoda/Jekyll/Octopress
# Author: Darryl Dias
# Syntax {% photo filename [tumbnail] [title] %}
# Syntax {% photos filename [filename] [filename] [...] %}
# If the filename has no path in it (no slashes)
# then it will prefix the `_config.yml` setting `photos_prefix` to the path.
# This allows using a CDN if desired.
#
# To make FancyBox work well with OctoPress You need to include the style fix.
@DarrylDias
DarrylDias / sitemap.xml
Created September 20, 2014 12:09
Sitemap written in Liquid for Jekyll. http://darryldias.me/blog/sitemap-for-jekyll
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
{% for post in site.posts %}
<url>
<loc>{{ site.url }}{{ post.url | remove: 'index.html' }}</loc>
{% if page.date %}
<lastmod>{{ page.date | date: "%Y-%m-%d" }}</lastmod>
@DarrylDias
DarrylDias / .nvimrc
Created August 18, 2014 13:42
My neovim config
"" NeoVIM RC.
"" gist: https://gist.github.com/DarrylDias/84e610786f60b2e62d65
:set number
:syntax on
:filetype plugin indent on
:set backspace=indent,eol,start
@DarrylDias
DarrylDias / tmux.md
Created August 12, 2014 12:21 — forked from andreyvit/tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@DarrylDias
DarrylDias / minify.rb
Created August 3, 2014 13:03
HTML/Javascript minifier for MiniSoda
# HTML/Javascript minifier for MiniSoda
# gem install packr --no-ri --no-rdoc
require 'packr'
module Jekyll
module Compressor
@DarrylDias
DarrylDias / .htaccess
Last active August 29, 2015 14:04
mod_rewrite for Slim.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
@DarrylDias
DarrylDias / readmore.html
Last active August 29, 2015 14:03
Adding Read More to Jekyll.
{% if post.content contains '<!--more-->' %}
{{ post.content | split:'<!--more-->' | first }}
<p><a href="{{ post.url }}">View Post</a></p>
{% else %}
{{ post.content }}
@DarrylDias
DarrylDias / atom.xml
Last active August 29, 2015 14:03
Atom feed for Jekyll
---
layout: nil
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[{{ site.title | cdata_escape }}]]></title>
<link href="{{ site.url }}/atom.xml" rel="self"/>
<link href="{{ site.url }}/"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<VirtualHost *:80>
ServerName demo.centosblog.com
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
AddDefaultCharset Off
Order deny,allow
@DarrylDias
DarrylDias / hello-world-swift.swift
Created June 6, 2014 10:15
Hello World! in Swift
import Foundation
println("Hello, World!")