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 / live-tile.hbs
Created June 27, 2017 09:34
Live TIle for Ghost blogging platform
<meta name="application-name" content="{{@blog.title}}"/>
<meta name="msapplication-TileColor" content="#00acff"/>
<meta name="msapplication-square70x70logo" content="{{@blog.logo}}"/>
<meta name="msapplication-square150x150logo" content="{{@blog.logo}}"/>
<meta name="msapplication-wide310x150logo" content="{{@blog.logo}}"/>
<meta name="msapplication-square310x310logo" content="{{@blog.logo}}"/>
<meta name="msapplication-notification" content="frequency=30;polling-uri=http://notifications.buildmypinnedsite.com/?feed={{@blog.url}}/rss/&id=1;polling-uri2=http://notifications.buildmypinnedsite.com/?feed={{@blog.url}}/rss/&id=2;polling-uri3=http://notifications.buildmypinnedsite.com/?feed={{@blog.url}}/rss/&id=3;polling-uri4=http://notifications.buildmypinnedsite.com/?feed={{@blog.url}}/rss/&id=4;polling-uri5=http://notifications.buildmypinnedsite.com/?feed={{@blog.url}}/rss/&id=5; cycle=1"/>
<!-- Created by Darryl Dias http://darryldias.me/live-tile-for-ghost -->
@DarrylDias
DarrylDias / live-tile.html
Created June 27, 2017 09:32
Live Tile for Jekyll
<meta name="application-name" content="{{site.title}}"/>
<meta name="msapplication-TileColor" content="#00acff"/>
{% if site.logo %}
<meta name="msapplication-square70x70logo" content="{{site.logo}}"/>
<meta name="msapplication-square150x150logo" content="{{site.logo}}"/>
<meta name="msapplication-wide310x150logo" content="{{site.logo}}"/>
<meta name="msapplication-square310x310logo" content="{{site.logo}}"/>
{% endif %}
<meta name="msapplication-notification" content="frequency=30;polling-uri=http://notifications.buildmypinnedsite.com/?feed={{site.url}}/atom.xml&id=1;polling-uri2=http://notifications.buildmypinnedsite.com/?feed={{site.url}}/atom.xml&id=2;polling-uri3=http://notifications.buildmypinnedsite.com/?feed={{site.url}}/atom.xml&id=3;polling-uri4=http://notifications.buildmypinnedsite.com/?feed={{site.url}}/atom.xml&id=4;polling-uri5=http://notifications.buildmypinnedsite.com/?feed={{site.url}}/atom.xml&id=5; cycle=1"/>
<!-- Created by Darryl Dias http://darryldias.m
@DarrylDias
DarrylDias / single.php
Last active June 8, 2017 14:26
AdSense supported WordPress AMP single.php
<?php
$publisher_id = "ca-pub-xxxxxxxxxxxxxxxx";
$ad_slot = "xxxxxxxxxx";
?>
<!doctype html>
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( 'html_tag_attributes' ) ); ?>>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
@DarrylDias
DarrylDias / adsense-amp.html
Created June 8, 2017 14:20
AdSense optimised for AMP.
<!-- AdSense Snippet -->
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block;"
data-ad-client="ca-pub-xxxxxxxxxxxxxxxx"
data-ad-slot="xxxxxxxxxx"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
@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" />
---
title: Lorem Ipsum
date: 2015/08/17
description: A sample post
taxonomy:
tag: [sample]
category: [blog]
---
@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 / nginx.conf
Last active January 4, 2016 22:19
nginx.conf for running Ghost on Arch Linux ARM.
http {
server {
listen 80;
location / {
proxy_pass http://127.0.0.1:2368;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
@DarrylDias
DarrylDias / phpmyadmin.conf
Created January 15, 2014 08:22
NGINX phpMyAdmin configuration for Fedora.
server {
listen 81; #You can change listen to the port you prefer
server_name localhost; # the server_name must be changed to the domain if required
root /usr/share/phpMyAdmin; # the root must be changed if the path to phpMyAdmin is different
index index.php;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
@DarrylDias
DarrylDias / ghost-starter.sh
Last active January 2, 2016 23:08
Ghost starter script.
#!/usr/bin/bash
if [ $(ps aux | grep node | grep -v grep | wc -l | tr -s "\n") -eq 0 ]
then
export PATH=/usr/bin:$PATH
#export PATH=/usr/local/bin:$PATH # If Node.js is source complied.
export NODE_ENV=production
NODE_ENV=production forever start --sourceDir /path/to/your/ghost index.js >> /var/log/nodelog.log 2>&1
fi