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
| git rebase | |
| git rebase --abort | |
| git rebase --continue | |
| git rebase --skip | |
| git push origin feature --force | |
| git pull --rebase origin feature | |
| git merge fature --no-ff |
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
| curl -X POST -H "Content-Type: application/json" -d \ | |
| '{"deals":[{"id":"1023410623", "quantity":"3"}, {"id":"1023410633", "choices":"1023413223"}], \ | |
| "delivery": "smartpost", "delivery_info": { "smartpost": {"deliveryLocationID": "133"}}, \ | |
| "user": {"email": "juri.semjonov@gmail.com", "username": "Juri Semjonov", "phone": "55687059"}, \ | |
| "purchase": {}}' \ | |
| http://localhost:3000/api/v1/api_key/api_secret/purchases | |
| === | |
| {"success":true,"message":"Purchase successfully saved","url":"/en/cart/completed?hash=52b0acfb7bbd10c44f575f0db121fdd2&id=150995149","errors":[]} |
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
| #!/usr/bin/env bash | |
| locale-gen en_US.UTF-8 | |
| \curl -sSL https://get.rvm.io | bash -s stable --ruby | |
| source /usr/local/rvm/scripts/rvm | |
| rvm gemset create teddy | |
| rvm gemset use teddy --default |
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 django.db import models | |
| from django_fsm import FSMIntegerField, transition | |
| class Instance(models.Model): | |
| # Hardware types definition | |
| X2_HARDWARE_TYPE = 'c3.large' | |
| X4_HARDWARE_TYPE = 'c3.xlarge' | |
| X16_HARDWARE_TYPE = 'c3.4xlarge' | |
| HARDWARE_TYPE_CHOICES = ( |
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
| # Use pipe to transfer data between fork and parent process | |
| reader, writer = IO.pipe | |
| # Fork process to isolate the work with multiple database connections from application | |
| pid = fork do | |
| reader.close() | |
| begin | |
| # if used Redis uncomment this line to reset connection | |
| # REDIS = Redis.new(:host => '', :port => '', :password => '') |
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
| Server Software: Webmachine-Ruby/1.2.2 | |
| Server Hostname: 127.0.0.1 | |
| Server Port: 4000 | |
| Document Path: /api/track?token=dfjhdfhfdjhdfjhfd878fg | |
| Document Length: 0 bytes | |
| Concurrency Level: 100 | |
| Time taken for tests: 2.607 seconds | |
| Complete requests: 1000 |
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
| Server Software: Webmachine-Ruby/1.2.2 | |
| Server Hostname: 127.0.0.1 | |
| Server Port: 4000 | |
| Document Path: /api/track?token=test_token | |
| Document Length: 0 bytes | |
| Concurrency Level: 100 | |
| Time taken for tests: 13.453 seconds | |
| Complete requests: 10000 |
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
| # The primary network interface | |
| auto eth0 | |
| iface eth0 inet dhcp | |
| up ip addr add 172.31.10.125/32 dev eth0 |
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
| # echo "200 out" >> /etc/iproute2/rt_tables | |
| auto eth1 | |
| iface eth1 inet static | |
| address 172.31.10.172 | |
| netmask 255.255.240.0 | |
| network 172.31.0.0 | |
| broadcast 172.31.15.255 | |
| up ip route add default via 172.31.0.1 dev eth1 table out | |
| up ip rule add from 172.31.10.172/32 table out |
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
| sudo apt-get install build-essential | |
| cpan install List::Util::WeightedRoundRobin |
OlderNewer