Skip to content

Instantly share code, notes, and snippets.

View phpinfo:test.php
// use posix to get current uid and gid
$uid = posix_geteuid();
$usr = posix_getpwuid($uid);
$user = $usr['name'];
$gid = posix_getegid();
$grp = posix_getgrgid($gid);
$group = $grp['name'];
derky1202 / _style.scss
Created Sep 5, 2012
View _style.scss
// This File is imported last, and will override other styles in the cascade
// Add styles here to make changes without digging in too much
@media only screen and (min-width: 550px) {
body > header h2 { padding-left: 60px; }
body > footer { margin-bottom: 3em; }
derky1202 / _fonts.scss
Created Sep 5, 2012
View _fonts.scss
// Here you can easily change font faces which are used in your site.
// To give it a try, uncomment some of the lines below rebuild your blog, and see how it works. your sites's.
// If you love to use Web Fonts, you also need to add some lines to source/_includes/custom/head.html
//$sans: "Optima", sans-serif;
//$serif: "Baskerville", serif;
//$mono: "Courier", monospace;
//$heading-font-family: "Verdana", sans-serif;
//$header-title-font-family: "Futura", sans-serif;
//$header-subtitle-font-family: "Futura", sans-serif;
derky1202 / head.html
Created Sep 5, 2012
View head.html
<!--Fonts from Google"s Web font directory at -->
<link href=",italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href=",italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href='|Ruthie|Flavors|Rancho|Galdeano' rel='stylesheet' type='text/css'>
<link href='[object Object],[object Object],[object Object],[object Object]' rel='stylesheet' type='text/css'>
derky1202 / categories.html
Created Jan 24, 2012
用于设立category list,请将该文件放入 source/_includes/asides/
View categories.html
<ul id="categories">
{% category_list %}
derky1202 / category_list.rb
Created Jan 23, 2012 — forked from nistude/category_list.rb
A category list tag for jekyll
View category_list.rb
# place this file in your plugins directory and add the tag to your sidebar
#$ cat source/_includes/asides/categories.html
# <h1>Categories</h1>
# <ul id="categories">
# {% category_list %}
# </ul>
module Jekyll
derky1202 / wp-xml-octopress-import.rb
Created Jan 4, 2012 — forked from tnmt/wp-xml-octopress-import.rb
Import XML of Wordpress to Octopress
View wp-xml-octopress-import.rb
# -*- coding: utf-8 -*-
require 'fileutils'
require 'date'
require 'yaml'
require 'uri'
require 'rexml/document'
include REXML
doc =[0])