Skip to content

Instantly share code, notes, and snippets.

View glidenote's full-sized avatar

Akira Maeda glidenote

View GitHub Profile
#!/usr/bin/perl
# The above line may need to be changed to point at your version of Perl
# Very simple web malware detection module.
# Author: CBL Team <[email protected]>
# Version 0.02
# Change history:
# .01->.02: search 100 lines, add socket to scriptpat (2011/11/25)
# List of access-control files to check
if exists("did_load_filetypes")
finish
endif
augroup filetypedetect
autocmd BufRead,BufNewFile *.markdown setfiletype octopress
autocmd BufRead,BufNewFile *.md setfiletype octopress
autocmd BufRead,BufNewFile .pryrc setfiletype ruby
autocmd BufRead,BufNewFile Gemfile setfiletype ruby
augroup END
@glidenote
glidenote / Rakefile.diff
Created October 31, 2012 05:02
Rakefile.diff
diff --git a/Rakefile b/Rakefile
index 183ee17..8f01014 100644
--- a/Rakefile
+++ b/Rakefile
@@ -73,18 +73,18 @@ end
desc "preview the site in a web browser"
task :preview do
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
- puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}"
+ puts "Starting to watch source with Jekyll and Compass. Starting Thin on port #{server_port}"
@glidenote
glidenote / Gemfile.diff
Created October 30, 2012 11:02
Gemfile
diff --git a/Gemfile b/Gemfile
index 13a2050..be86346 100644
--- a/Gemfile
+++ b/Gemfile
@@ -15,6 +15,7 @@ group :development do
gem 'liquid', '2.2.2'
gem 'ruby-aaws'
gem 'rubypython'
+ gem "thin", "~> 1.5.0"
end
@glidenote
glidenote / .zshrc
Created October 20, 2012 08:33
.zshrc for antigen
source /path-to-antigen-clone/antigen.zsh
# Load the oh-my-zsh's library.
antigen-lib
# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen-bundle git
antigen-bundle heroku
antigen-bundle pip
antigen-bundle lein
#!/bin/sh
SERVERS="
mysql0.glidenote.lan
mysql1.glidenote.lan
mysql2.glidenote.lan
mysql3.glidenote.lan
mysql4.glidenote.lan
mysql5.glidenote.lan
mysql6.glidenote.lan
@glidenote
glidenote / Rakefile.diff
Created August 29, 2012 09:52
octopress for s3
diff --git a/Rakefile b/Rakefile
index 3d2b385..183ee17 100644
--- a/Rakefile
+++ b/Rakefile
@@ -355,3 +355,16 @@ task :list do
puts "Tasks: #{(Rake::Task.tasks - [Rake::Task[:list]]).join(', ')}"
puts "(type rake -T for more detail)\n\n"
end
+
+s3_bucket = "blog.glidenote.com"
require 'formula'
class Zsh50 < Formula
homepage 'http://www.zsh.org/'
url 'ftp://ftp.zsh.org/pub/zsh-5.0.0.tar.gz'
md5 '01df38e4aa34aa227462fdf2f6d4c5cd'
depends_on 'gdbm'
depends_on 'pcre'
@glidenote
glidenote / gist:3161853
Created July 23, 2012 03:13
git filter-branch
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_NAME" = "maeda" ];
then
GIT_AUTHOR_NAME="Akira Maeda";
GIT_AUTHOR_EMAIL="[email protected]";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
@glidenote
glidenote / format_debug1.rb
Created July 15, 2012 08:19
format_debug.rb
log = '1342297357.149'
format = /^(?<date>[^ ]+)$/
time_format = ''