Skip to content

Instantly share code, notes, and snippets.

{
"vars": {
"@gray-darker": "lighten(#000, 13.5%)",
"@gray-dark": "lighten(#000, 20%)",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 46.7%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#359",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",
@aahan
aahan / ps.md
Created July 16, 2014 19:33
Windows 7 File Properties: Get 'date created' up to seconds using PowerShell

Open PowerShell: Start > All Programs > Accessories > Windows PowerShell > Windows PowerShell

To get Date Created, run commands:

$file = Get-Item "D:\My folder\my-file.md"
$file.CreationTime

The output will look like this (in system's local time):

Wednesday, July 16, 2014 16:24:00
@aahan
aahan / MySQL & MariaDB Config.md
Last active December 12, 2015 09:49
Configuring MySQL/MariaDB - Explanation of important variables.
@aahan
aahan / Highlight First Post.php
Last active December 13, 2015 17:58
Adds a custom class for the first post, on the first page of index and archive pages.
<?php
if( $wp_query->current_post == 0 && !is_paged() ) {
post_class('first-post');
} else {
post_class();
}
?>
@aahan
aahan / WordPress to Jekyll Checklist.md
Last active December 15, 2015 04:39
Considering a move from WordPress to a database-free static site using Jekyll/Octopress? Here are some of the important things you need to make sure are there.
@aahan
aahan / Style Guide.md
Last active December 15, 2015 06:49
List of style guides for my favorite languages.
@aahan
aahan / jekyll-octopress-setup.md
Last active December 15, 2015 07:59
Setting up my Jekyll/Octopress site on my Ubuntu 12.04 LTS virtual server.

Initial setup

Update System

sudo apt-get update && sudo apt-get upgrade

Install Git

sudo apt-get install git
@aahan
aahan / README.md
Last active December 15, 2015 08:09
Jekyll RSS feed template based on WordPress' RSS feed template.

feed.xml

---
layout: nil
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"

Pre-requisites

Server running Debian/Ubuntu Server with Nginx webserver set up.

Initial setup

Update System

sudo apt-get update && sudo apt-get upgrade
/* Delete revisions */
DELETE FROM wp_posts WHERE post_type = "revision";
/* Only use this if you no longer care about any of your current revisions! */
/* Delete trashed posts */
DELETE FROM wp_posts WHERE post_type = "trash";
/* Delete Unapproved comments */
DELETE FROM wp_comments WHERE comment_approved = "0";
/* Only use this if you no longer care about the current queue of unapproved comments! */