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
<img src="http://upload.wikimedia.org/wikipedia/zh/3/34/Lenna.jpg " alt="Lena Söderberg full color" title="Lena Söderberg full color" style="float:left" /> | |
<svg xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
width="300" height="300"> | |
<filter id="greyscale"> | |
<feColorMatrix type="matrix" values="0.3333 0.3333 0.3333 0 0 | |
0.3333 0.3333 0.3333 0 0 | |
0.3333 0.3333 0.3333 0 0 |
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
# Usage: | |
# cat <environment>.log | grep Load | grep SELECT | ruby filter.rb | |
MAX_TIME = 300.0 | |
h = {} | |
STDIN.read.split("\n").each do |line| | |
list = line.split(' ') | |
time = list[2].scan(/\((.*)\./).flatten[0].to_f |
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
var $button = $(button), | |
target = $button.data('target'), | |
$parent = $('.pollWrapped'); | |
// simultanious action | |
$(target).stop(false, false).toggleClass('open').slideToggle(100).siblings().removeClass('open').slideUp(100); | |
var action = ($(target).parent().find('.open').length) ? 'addClass' : 'removeClass'; | |
$parent[action]('showUpload'); |
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 'benchmark' | |
iterations = 100_000 | |
Benchmark.bm do |bm| | |
bm.report do | |
iterations.times do | |
"a,b,c,d".split(',').any? { |letter| letter == 'd' } | |
end | |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { | |
options: { | |
includePaths: ['bower_components/foundation/scss'] | |
}, | |
dist: { | |
options: { |
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
.select2-container { | |
box-sizing: border-box; | |
display: inline-block; | |
margin: 0; | |
position: relative; | |
vertical-align: middle; } | |
.select2-container .select2-selection--single { | |
box-sizing: border-box; | |
cursor: pointer; | |
display: block; |