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 RestUser< ActiveResource::Base | |
self.include_format_in_path = false | |
self.format = :json_with_root | |
ActiveResource::Base.logger = ActiveRecord::Base.logger | |
self.site = "https://dummyapi.io/data/v1" | |
self.collection_name = "user" | |
self.headers['app-id'] = '62a775e08964108a7e6a7ba6' | |
has_many :posts, class_name: :RestPost |
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
module ActiveResource | |
module Formats | |
module JsonWithRootFormat | |
extend self | |
def extension | |
"json" | |
end | |
def mime_type |
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 RestPost < ActiveResource::Base | |
self.include_format_in_path = false | |
self.format = :json_with_root | |
ActiveResource::Base.logger = ActiveRecord::Base.logger | |
self.site = 'https://dummyapi.io/data/v1' | |
self.headers['app-id'] = '62a775e08964108a7e6a7ba6' | |
self.collection_name = 'post' | |
belongs_to :owner, class_name: :RestUser |
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
# frozen_string_literal: true | |
CalendlyAdmin.register RestUser do | |
menu priority: 99 | |
actions :index | |
controller do | |
def permitted_params | |
params.permit! | |
end |
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
// $params = new GetDataCenterUrlsRequest(); | |
// $params->account = ""; | |
// $response = $service->getDataCenterUrls($params); | |
// var_dump($response); die(); |
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
$ormQueryObject->get_query()->compile() |
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
run-shell "~/Library/Python/2.7/bin/powerline-daemon -q" | |
source "~/Library/Python/2.7/lib/python/site-packages/powerline/bindings/tmux/powerline.conf" | |
set -g default-terminal "screen-256color" | |
set -g @plugin 'seebi/tmux-colors-solarized' | |
set -g @colors-solarized 'dark' | |
set-option -g mouse on | |
# Copy-paste integration | |
set-option -g default-command "reattach-to-user-namespace -l bash" |
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
source ~/Library/Python/2.7/lib/python/site-packages/powerline/bindings/vim/plugin/powerline.vim | |
set laststatus=2 | |
set cursorline | |
execute pathogen#infect() | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline_powerline_fonts = 1 | |
let g:solarized_base16 = 1 | |
syntax enable | |
set background=dark | |
" solarized options |
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
brew rm vim vim python | |
brew install python | |
brew install vim --with-override-system-vi | |
brew install macvim --with-override-system-vim | |
sudo brew linkapps macvim |
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
syntax enable | |
set encoding=utf-8 | |
set background=dark | |
colorscheme solarized | |
set number | |
set cursorline | |
set expandtab | |
set tabstop=2 | |
set shiftwidth=2 | |
set backspace=2 |
NewerOlder