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
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 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 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 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 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": "[email protected]", "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 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 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
# Database administrative login by Unix domain socket | |
local all postgres trust | |
# TYPE DATABASE USER ADDRESS METHOD | |
# "local" is for Unix domain socket connections only | |
local all all trust | |
# IPv4 local connections: | |
host all all 127.0.0.1/32 trust | |
# IPv6 local connections: |
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
detectCanvas: => | |
if @canvas | |
@canvas.replaceWith("<canvas class='picture_canvas' data-block='canvas'></canvas>") | |
@canvas = @container.find("*[data-block='canvas']") | |
@ctx = @canvas.get(0).getContext("2d") | |
handleImage: (e) => | |
@detectCanvas() |
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
sudo installer -pkg wxPython2.8-osx-unicode-universal-py2.7.pkg -target / | |
installer: Package name is wxPython2.8-osx-unicode-universal-py2.7 | |
installer: Installing at base path / | |
2013-03-22 10:09:12.634 installer[8633:5a03] Package /Users/semjonow/Desktop/wxPython2.8-osx-unicode-universal-py2.7.pkg uses a deprecated pre-10.2 format (or uses a newer format but is invalid). | |
installer: The install was successful. |
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
class Application.Views.Base | |
@bindWith: (selector) -> | |
instance = @ | |
$(selector).each -> | |
new instance($(@)) | |
constructor: (@container) -> | |
_.extend(@, Backbone.Events) |