require 'ruby-prof'
require 'ruby-prof-flamegraph'
result = RubyProf.profile do
# code to profile
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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
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
# | |
# exists.rb | |
# | |
# Copyright 2011 Puppet Labs Inc. | |
# Copyright 2011 Krzysztof Wilczynski | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# |
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
## Rails 3.2.0 (January 20, 2012) ## | |
* Upgrade mail version to 2.4.0 *ML* | |
* Remove Old ActionMailer API *Josh Kalderimis* |
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
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
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
bundle exec cane --no-doc --gte "path/to/coverage/covered_percent,99" --lte "path/to/coverage/missed_lines,28" |
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
base | |
* simplecov | |
* rspec | |
* capybara | |
quality | |
* checker | |
* rails_best_practices | |
* jslint | |
* coffeelint |
Installation
npm install -g http-server
API Console unfortunately is not available on NPM. See its README for installation instructions.
You might have to run grunt
after installation. Grunt opens a web page, just close it.
Run:
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
/* | |
https://webapps.stackexchange.com/questions/100820/how-do-i-invite-all-team-members-to-a-new-slack-channel#answer-104062 | |
Instructions: Just browse to the appropriate channel and paste | |
this script (below) into your Chrome/Firefox dev console and hit enter. | |
Then wait for the script to run until it completes. | |
It might take time as there is a limit to how many users may be invited at once. | |
The script will loop until all team members are invited. | |
*/ | |
var foundAny=false; | |
function selectAllByLetter(remainingLetters) { |
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
img[src$='#center'] | |
{ | |
display: block; | |
margin: 0.7rem auto; /* you can replace the vertical '0.7rem' by | |
whatever floats your boat, but keep the | |
horizontal 'auto' for this to work */ | |
/* whatever else styles you fancy here */ | |
} | |
img[src$='#floatleft'] |
OlderNewer