This file contains hidden or 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 'formula' | |
class Zaw < Formula | |
homepage 'https://github.com/zsh-users/zaw' | |
head 'https://github.com/zsh-users/zaw.git' | |
def install | |
(share/'zaw').install Dir['*'] | |
end |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'rexml/document' | |
require 'elasticsearch' | |
doc = REXML::Document.new(open(ARGV[0]).read) | |
es = Elasticsearch::Client.new log: true | |
doc.elements.each('/posts/post') do |element| | |
# attributes: [href, time, description, extended, tag, hash, shared] |
This file contains hidden or 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 'sinatra/base' | |
require 'forwardable' | |
class I18n | |
def self.t(s); "I18n.t(#{s})"; end | |
def self.l(s); "I18n.l(#{s})"; end | |
end | |
class App < Sinatra::Base | |
extend Forwardable |
This file contains hidden or 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
diff --git a/qualifier/webapp/ruby/app.rb b/qualifier/webapp/ruby/app.rb | |
index 4d64f98..0a45adf 100644 | |
--- a/qualifier/webapp/ruby/app.rb | |
+++ b/qualifier/webapp/ruby/app.rb | |
@@ -8,6 +8,7 @@ require 'erubis' | |
require 'tempfile' | |
require 'redcarpet' | |
require 'rack/perftools_profiler' | |
+require 'redis' | |
This file contains hidden or 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
source 'https://rubygems.org' | |
gem 'guard-livereload' | |
gem 'guard-shell' | |
gem 'rb-fsevent' | |
gem 'foreman' | |
gem 'terminal-notifier-guard' |
This file contains hidden or 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 zaw-src-hg-files() { | |
hg root >/dev/null 2>&1 | |
if [[ $? == 0 ]]; then | |
candidates=("${(ps:\0:)$(hg status -cman0)[1,-2]}") | |
fi | |
actions=("zaw-callback-edit-file" "zaw-callback-append-to-buffer") | |
act_descriptions=("edit file" "append to edit buffer") | |
options=("-m") | |
} |
This file contains hidden or 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
# -*- sh -*- | |
zmodload zsh/parameter | |
function zaw-src-gisty() { | |
candidates=("${(ps:\n:)$(gisty list)}") | |
actions=("zaw-callback-gisty-append-to-buffer") | |
act_descriptions=("append to edit buffer") | |
} | |
zaw-register-src -n gisty zaw-src-gisty |
This file contains hidden or 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
#compdef pbl | |
_arguments "1:first:($(curl -s https://$pinboard_username:[email protected]/v1/tags/get | grep tag= | sed -Ee 's/.*tag=\"(.*)\".*/\1/'))" |