- HTTP 形式:
git clone https://github.com/owner/git.git
- SSH 形式:
git clone git@github.com:owner/git.git
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
| class Saga | |
| class << self | |
| def with_redis; raise NotImplementedError; end | |
| attr_accessor :cleanup_delay, :queue, :last_txid | |
| def queue | |
| Thread.current[:saga_queue] ||= [] | |
| end | |
| def last_txid |
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
| class DirtyPipeline::Action | |
| module WrappedCall | |
| def call | |
| Events.publish! Event.generate(self) | |
| super | |
| end | |
| end | |
| class << self | |
| attr_accessor :attempted_event_klass, :pipeline, :timeout |
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
| from lxml import etree | |
| get error: | |
| ImportError: dlopen(/etc/locale/lib/python3.6/site-packages/lxml/etree.cpython-36m-darwin.so, 2): Symbol not found: __PyErr_FormatFromCause | |
| solution: | |
| pip uninstall lxml | |
| python3 -mvenv /tmp/lxml | |
| source /tmp/lxml/bin/activate | |
| pip install lxml --no-binary :all: |
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
| # First the end result of what we want: | |
| class Foo | |
| before_hook :whoa | |
| before_hook :amazing | |
| def test | |
| puts "This is kinda cool!" | |
| 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
| # 1. Clear retry set | |
| Sidekiq::RetrySet.new.clear | |
| # 2. Clear scheduled jobs | |
| Sidekiq::ScheduledSet.new.clear | |
| # 3. Clear 'Processed' and 'Failed' jobs |
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
| pragma solidity ^0.4.10; | |
| contract Ownable { | |
| address owner; | |
| function Ownable() public { | |
| owner = msg.sender; | |
| } | |
| modifier Owned { | |
| require(msg.sender == owner); |
NewerOlder