This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PCRE_URL='http://downloads.sourceforge.net/project/pcre/pcre/8.32/' | |
PCRE_FILE='pcre-8.32' | |
NGINX_URL="http://nginx.org/download/" | |
NGINX_FILE="nginx-1.2.8" | |
SRC_DIR="/Applications/MNPP/src" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Jekyll | |
module Convertible | |
def write(dest) | |
path = destination(dest) | |
FileUtils.mkdir_p(File.dirname(path)) | |
if File.extname(path).downcase == '.html' then | |
self.output.strip! | |
reg = /<\/?pre[^>]*>/i | |
pres = self.output.scan(reg) | |
tary = self.output.split(reg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Jekyll | |
module Slug2Name | |
def slug2name(input) | |
slug = @context.registers[:site].config['category_slugs'][input] | |
slug ? slug : input | |
end | |
end | |
end | |
Liquid::Template.register_filter(Jekyll::Slug2Name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Jekyll | |
module Convertible | |
alias :origin_render_liquid :render_liquid | |
def render_liquid(content, payload, info) | |
content.gsub!(/(?:^|\n)```(\w*)\n(.*?\n)```\n/m) do |text| | |
$1.empty? ? text : "\n{% highlight #{$1} %}\n#{$2}{% endhighlight %}" | |
end | |
origin_render_liquid(content, payload, info) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Settings | |
set timezone to "+09:00" | |
set postdir to "Macintosh HD:Users:kerotaa:Sites:kerotaa.github.com:_posts" | |
set editor to "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" | |
-- Get Date | |
set dt to (current date) | |
on date_to_iso(dt) | |
set {year:y, month:m, day:d} to dt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'html_press' | |
module Jekyll | |
module Convertible | |
def write(dest) | |
path = destination(dest) | |
FileUtils.mkdir_p(File.dirname(path)) | |
if File.extname(path).downcase == '.html' then | |
self.output = HtmlPress.press self.output | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Jekyll | |
module Convertible | |
def write(dest) | |
path = destination(dest) | |
FileUtils.mkdir_p(File.dirname(path)) | |
if File.extname(path).downcase == '.html' then | |
self.output.strip! | |
reg = /<\/?pre[^>]*>/i | |
pres = self.output.scan(reg) | |
tary = self.output.split(reg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#target photoshop | |
app.bringToFront(); | |
(function(global) { | |
if (!documents.length) return; | |
function getSelectedLayers() { | |
var layers, gL, desc11, ref9, ref10; | |
layers = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function throttle(fn, interval) { | |
var timer = null; | |
return function() { | |
var self = this, args = arguments; | |
if (!timer) { | |
timer = setTimeout(function() { | |
timer = null; | |
fn.apply(self, args); | |
}, interval); | |
} |
OlderNewer