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
// Copyright (c) 2010, 2012 Matt Enright | |
// Permission is hereby granted, free of charge, to any person obtaining | |
// a copy of this software and associated documentation files (the | |
// "Software"), to deal in the Software without restriction, including | |
// without limitation the rights to use, copy, modify, merge, publish, | |
// distribute, sublicense, and/or sell copies of the Software, and to | |
// permit persons to whom the Software is furnished to do so, subject to | |
// the following conditions: | |
// |
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
public static class AbsoluteUrl | |
{ | |
private static bool initializedAlready = false; | |
private static Object initlock = new Object(); | |
// AbsoluteUrl without parameters | |
public static string MVC_Home_Index; | |
public static string MVC_MyArea_Settings_Index; | |
// AbsoluteUrl with parameters |
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
{% capture html %} | |
<html> | |
... | |
</html> | |
{% endcapture %}{{ html | strip_newlines | replace:' ','' | replace:' ','' | replace:' ',' ' }} |
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
# Requires Capistrano 3.2 or later | |
namespace :deploy do | |
after :finishing, :tag_and_push_tag do | |
on roles(:app) do | |
within release_path do | |
set(:current_revision, capture(:cat, 'REVISION')) | |
# release path may be resolved already or not | |
resolved_release_path = capture(:pwd, "-P") |
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://docs.shopify.com/api/introduction/api-call-limit | |
module ActiveResource | |
# 429 Client Error | |
class RateLimitExceededError < ClientError # :nodoc: | |
end | |
class Connection | |
RATE_LIMIT_SLEEP_SECONDS = 20 # number of seconds to sleep (by sleeping 20 you reset the clock to get 40 fresh burst calls with the default 2 calls/sec) |