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
varnishadm "ban.url ." |
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
def build_agg_hash(condition_hash) | |
return '' unless condition_hash && condition_hash.length > 0 | |
range, value = condition_hash.shift | |
{'$cond' => { | |
'$if' => {'$gte' => range.first, '$lt' => range.last}, | |
'$then' => value, | |
'$else' => build_agg_hash(condition_hash) | |
}} | |
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
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Made of Code.tmTheme", | |
"detect_indentation": false, | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
".DS_Store", |
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
PING yahoo.com (206.190.36.45): 56 data bytes | |
64 bytes from 206.190.36.45: icmp_seq=0 ttl=49 time=87.727 ms | |
64 bytes from 206.190.36.45: icmp_seq=1 ttl=49 time=82.465 ms | |
64 bytes from 206.190.36.45: icmp_seq=2 ttl=49 time=82.931 ms | |
64 bytes from 206.190.36.45: icmp_seq=3 ttl=49 time=134.212 ms | |
64 bytes from 206.190.36.45: icmp_seq=4 ttl=49 time=81.815 ms | |
64 bytes from 206.190.36.45: icmp_seq=5 ttl=49 time=83.399 ms | |
64 bytes from 206.190.36.45: icmp_seq=6 ttl=49 time=84.119 ms | |
64 bytes from 206.190.36.45: icmp_seq=7 ttl=49 time=84.665 ms | |
64 bytes from 206.190.36.45: icmp_seq=8 ttl=49 time=80.456 ms |
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
PING yahoo.com (206.190.36.45): 56 data bytes | |
64 bytes from 206.190.36.45: icmp_seq=0 ttl=49 time=717.221 ms | |
64 bytes from 206.190.36.45: icmp_seq=1 ttl=49 time=134.367 ms | |
64 bytes from 206.190.36.45: icmp_seq=2 ttl=49 time=87.870 ms | |
Request timeout for icmp_seq 3 | |
Request timeout for icmp_seq 4 | |
Request timeout for icmp_seq 5 | |
64 bytes from 206.190.36.45: icmp_seq=3 ttl=49 time=3834.620 ms | |
64 bytes from 206.190.36.45: icmp_seq=4 ttl=49 time=2845.990 ms | |
64 bytes from 206.190.36.45: icmp_seq=5 ttl=49 time=1846.129 ms |
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
Error Page Exception | |
SRVE0260E: The server cannot use the error page specified for your application to handle the Original Exception printed below. | |
Original Exception: | |
Error Message: JSPG0227E: Exception caught while translating /WEB-INF/jsp/common/layouts/landingLayout.jsp: java.lang.reflect.InvocationTargetException | |
Error Code: 500 | |
Target Servlet: /WEB-INF/jsp/common/layouts/landingLayout.jsp |
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 :kill_postgres_connections => :environment do | |
db_name = ActiveRecord::Base.configurations[Rails.env.to_s]['database'] | |
raise "No database name found in #{Rails.env} configuration." if db_name.nil? | |
sh = <<EOF | |
ps xa \ | |
| grep postgres: \ | |
| grep #{db_name} \ | |
| grep -v grep \ | |
| awk '{print $1}' \ | |
| xargs kill |
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
Rails.application.assets.logger = Logger.new('/dev/null') | |
Rails::Rack::Logger.class_eval do | |
def call_with_quiet_assets(env) | |
previous_level = Rails.logger.level | |
Rails.logger.level = Logger::ERROR if env['PATH_INFO'].index("/assets/") == 0 | |
call_without_quiet_assets(env).tap do | |
Rails.logger.level = previous_level | |
end | |
end | |
alias_method_chain :call, :quiet_assets |
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
!!! XML | |
- xmlns = {"xmlns:android" => "http://schemas.android.com/apk/res/android"} | |
- id = "android:id"; width = "android:layout_width"; height = "android_layout_height"; text = "android:text"; orientation = "android:orientation" | |
%LinearLayout{ xmlns, width => "fill_parent", height => "fill_parent", orientation => "vertical" } | |
%TextView{ id => "@+id/text", width => "wrap_content", height => "wrap_content", text => "Hello, I am a TextView" } | |
%Button{ id => "@+id/button", width => "wrap_content", height => "wrap_content", text => "Hello, I am a Button" } |