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 / hb-snippet-variable-example.md
Created July 10, 2017 08:47 — forked from kennethormandy/hb-snippet-variable-example.md
A quick example Harp app that uses the correct title for your blog in the correct place.

A quick example Harp app that uses the correct title for your blog in the correct place.

The App

app/
  |- _harp.json
  |- _layout.ejs
  |- index.ejs
  |+ posts/
      |- _data.json
@DarrylDias
DarrylDias / postachio-gridly-theme.html
Created May 9, 2016 18:55 — forked from bmann/postachio-gridly-theme.html
Custom Postachio theme based on the Gridly base theme. Modified to focus on highlighting link posts over "original" posts. Home page links go directly to original article.
<!DOCTYPE html>
<html lang="en-US" prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<title>{% if is_home %}{{ site.author }} {% elif is_post %} {{ post.title }} {% elif is_link %} {{ link.title }} {% elif is_tag %} {{ tag }} {% elif is_page %} {{ page.title }} {% endif %} | {{ site.name }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
@DarrylDias
DarrylDias / profile.md
Created January 19, 2016 10:07 — forked from dhcole/profile.md
Profiling the `jekyll new` site
posts seconds time
1 0.824 0:0.824
100 2.644 0:2.644
1000 25.071 0:25.071
5000 186.715 3:6.715
10000 536.904 8:56.904

chart

@DarrylDias
DarrylDias / Ghost_to_HUGO_blog.php
Last active September 8, 2015 11:31 — forked from vjeantet/Ghost_to_HUGO_blog.php
Use this php script to convert a Ghost export json file to Hugo content file. Files will be created in a "output" folder, to reuse images place the ghost content folder into the hugo's static folder
<?php
$ghost_data = json_decode(file_get_contents("./GhostData.json"),true) ;
foreach ($ghost_data['data']['posts'] as $key => $value) {
$created_at = date("c",$value["created_at"]/1000);
$title = str_replace('\\','\\\\',$value["title"]) ;
$title = str_replace('"','\"',$title) ;
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
# Maximum and minimum number of peers to connect to per torrent.
min_peers = 1
max_peers = 100
# Same as above but for seeding completed torrents (-1 = same as downloading)
#!/bin/bash
#Heith Seewald 2012
#Feel free to extend/modify to meet your needs.
#Maya on Ubuntu v.1
#This is the base installer... I’ll add more features in later versions.
#if you have any issues, feel free email me at heiths@gmail.com
#### Lets run a few checks to make sure things work as expected.
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then

Wagtail tutorial

Thanks to [Serafeim Papastefanos] for authoring this tutorial. Please note that the installation process is in flux; most of the steps here should soon be unnecessary.

[Wagtail] is a new Open Source [Django]-based CMS. In this 20 minute tutorial we will see how you can create a blog from scratch using Wagtail. If you want to see some more examples of usage please take a look at the [wagtaildemo] GitHub project.

To follow this tutorial you will need to have [Python] 2.7 installed with a working version of [pip] and [virtualenv].

Installing the wagtail dependencies

@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