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
namespace :git do | |
desc 'Shows a Git diff between the current version on server and latest on HEAD' | |
task :diff_pending do | |
local_sha = `git rev-parse --verify HEAD` | |
remote_sha = capture("cd #{current_path}; git rev-parse --verify HEAD") | |
puts `git diff #{remote_sha.strip} #{local_sha.strip}` | |
end | |
desc 'Shows a Git log between the current version on server and latest on HEAD' | |
task :log_pending do |
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 'rubygems' | |
require 'yaml' | |
require 'prowl' | |
require 'readline' | |
config_file = File.join(ENV['HOME'], '.prowl') | |
if File.exist?(config_file) |
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
#!/bin/sh | |
# | |
# An example hook script to prepare a packed repository for use over | |
# dumb transports. | |
# | |
# To enable this hook, rename this file to "post-update". | |
WORKDIR="/some/git/repo/workdir" | |
export GIT_DIR=$WORKDIR/.git | |
pushd $WORKDIR > /dev/null |
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/ruby | |
require 'rubygems' | |
require 'gollum/frontend/app' | |
system("which git") or raise "Looks like I can't find the git CLI in your path.\nYour path is: #{ENV['PATH']}" | |
gollum_path = '/Users/priit/Documents/Fraktal/Wiki' | |
disable :run |
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
body { | |
font-family: HelveticaNeue; | |
font-weight: bold; | |
} | |
h1, h2, h3, h4, h5, h6 { | |
font-weight: bold; | |
} |
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
task :ask_production_confirmation do | |
set(:confirmed) do | |
puts <<-WARN | |
======================================================================== | |
WARNING: You're about to perform actions on production server(s) | |
Please confirm that all your intentions are kind and friendly | |
======================================================================== |
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
// Based on fantastic jQuery useragent parser plugin https://gist.github.com/373298 | |
function parse(uaStr) { | |
var agent = { | |
platform: {}, | |
browser: {}, | |
engine: {} | |
}; | |
var ua = uaStr, | |
p = agent.platform, |
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 'openssl' | |
require 'base64' | |
require 'digest/sha1' | |
c = OpenSSL::Cipher::Cipher.new("aes-128-cbc") | |
c.encrypt | |
# your pass is what is used to encrypt/decrypt | |
c.key = key = Digest::SHA1.hexdigest("whatever") | |
# c.iv = iv = c.random_iv | |
e = c.update("190") | |
e << c.final |
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 'openssl' | |
require 'base64' | |
require 'digest/sha1' | |
c = OpenSSL::Cipher::Cipher.new("aes-128-cbc") | |
c.encrypt | |
# your pass is what is used to encrypt/decrypt | |
c.key = key = Digest::SHA1.hexdigest("whatever") | |
# c.iv = iv = c.random_iv | |
e = c.update("190") | |
e << c.final |
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 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
print = false | |
doc = Nokogiri::HTML(open("http://www.cafenoir.ee/noir/")) | |
doc.css('table.contentpaneopen:nth-child(2) p').each do |p| |
OlderNewer