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
<div class="spinner"> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> | |
<div></div> |
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
var play = function() { | |
var boxes = $('#box span'); | |
var colors = boxes.map(function(idx, item) { | |
return $(item).css('background-color'); | |
}); | |
var color1 = {color: $.unique(colors)[0], count: 0}; | |
var color2 = {color: $.unique(colors)[1], count: 0}; | |
boxes.each(function(idx, item) { |
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
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 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 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 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 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 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 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 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