Skip to content

Instantly share code, notes, and snippets.

View sidtri's full-sized avatar
🎯
Focusing

sid d sidtri

🎯
Focusing
View GitHub Profile
class GraphMakerService
def initialize(data, parent_childrens=[], level = 10)
@data = data
@base_column = data.first.bs_table rescue ""
@parent_childrens = parent_childrens
# removing base column or parent_childrens from children if exist
@children_text = children_text.reject { |c| (c == @base_column) || (@parent_childrens.include? c) }
@parent_childrens = @parent_childrens + @children_text
@level = level
end
class GraphMakerService
def initialize(data, parent_childrens=[])
@data = data
@base_column = data.first.bs_table rescue ""
@parent_childrens = parent_childrens
# removing base column or parent_childrens from children if exist
@children_text = children_text.reject { |c| (c == @base_column) || (@parent_childrens.include? c) }
@parent_childrens = @parent_childrens + @children_text
end
window.margin = {top: 20, right: 120, bottom: 20, left: 120},
width = 960 - margin.right - margin.left,
height = 800 - margin.top - margin.bottom;
window.i = 0,
window.duration = 750,
window.root;
window.tree = d3.layout.tree()
.size([height, width]);
window.diagonal = d3.svg.diagonal()
.projection(function(d) { return [d.y, d.x]; });
POST /api/v1/products.json HTTP/1.1
Host: 127.0.0.1:3000
Cache-Control: no-cache
Postman-Token: 37979dcb-37c1-e6b9-1d0e-29eb83d2dcda
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="parameters[name]"
cat
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC6rtZvzlx9Bt22fOxFeK2vXv+xEwVwzJeganxJ3GwQaCd7nDBgW4Fh80iCFsK0421n1fbi/0TIPhg6V1YRI+7F2czEGjkEpjCwGUKlZNNoGeUnORzLK2RJkP0P7f6SbUrb9RHWBNu+3cvdU+UamSICpQ9hFFmjvqIrQCdpT0anO3LKdtJobbkbg6k5m2+RS8Av+l61tEtCwd1KGPTTcoSbjSHL3dElFXul4my1/e+VSmcBdFCTZpB+mxZ6gA3yh0FhYFu1AK/AQr6d3NNW70DlykBxeL1RjVY8ZYd4Yryr1I27OLeD7/FaF7Oz4tQ4OrPoQl2UJOLAd+aZGIUP6tZWw2raE8/cBtFmeis10CU/t9XGFFIkf2zD+aDLeW05Jh4CCNYNPCJInL7UU1Usk/vl2c6kMJvdoamrxsvdqNy4pUBTm6EsBEhXpNZnDAcM3KxU0rAGYMBTMc8Js5q5Ubugmi+jCjD2pBhvpKdxP7uJ/R/+SMlWqI6XmceygINSUT1mT3bikP4jFRwubr1d6cbId8X8VOOiHJgH5QBqf4Liup6+5npMCrBonLlGDDbd2KfRlN4lQA/uzr7aXsnlXlgyidkJnTcp209fhEkn9/Lj7xm2I+pFFrQpw0xW0bTB0fLLvtsYYKra8sJJG+OwHZOi7INUy3yUi5GZS1cj22b6ow== siddhartha@happ.co.in
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZOrd2UQC0fMuAvINXPWKIhwcrBTCcGo8uQ0WvPO1wTJhSSew+5all6g957MuvnJ4on0yJ/OvWRMM5n3l80fiH2+IBK7T+mM7m3F0N4p98JxbH+mX01+Q1eFoWl7KpzQmrAv3kIGuNXkGA3rAfR86Yoh4djVCANUhhBPcUK4Eiq9LgA/PCTknSDzMTrHZanq7PmREB2kQLOeND+hv/wBX+hvKHM89VzjVeNQc8qiVK1whH68Cgh7NjJBzcb/cL8helIVPI+dx/AHmmKBr97Ivj8iB73qtEwVOPOpn4Kgv6DRtIJbuuFMX6MoRdz9iTFUpJnAnlyLLVHv0Ct++yZUxl sid@HAPPTECH
#
# deb cdrom:[Ubuntu-Server 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted
# deb cdrom:[Ubuntu-Server 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://in.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty main restricted
<table class="table table-striped">
<thead>
<tr>
<th>Mon</th>
<th>Tue</th>
<th>Wed</th>
<th>Thu</th>
<th>Fri</th>
<th>Sat</th>
<th>Sun</th>
# PostgreSQL. Versions 8.2 and up are supported.
#
# Install the pg driver:
# gem install pg
# On OS X with Homebrew:
# gem install pg -- --with-pg-config=/usr/local/bin/pg_config
# On OS X with MacPorts:
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
# On Windows:
# gem install pg
@sidtri
sidtri / gist:04bc1f5bbe78fd95c7782dbfd7af311b
Last active November 15, 2016 07:55
Setup Ruby on rails
1) For ubuntu : Setup dependencies
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
2) Insall RVM
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 2.2.1