Skip to content

Instantly share code, notes, and snippets.

View senid231's full-sized avatar
🇺🇦
Все буде Україна

Denis Talakevich senid231

🇺🇦
Все буде Україна
View GitHub Profile
@senid231
senid231 / jr_bug_polymorphic_relationship.rb
Last active February 20, 2017 11:12
json-api-resources bug with polymorphic relationship when primary_key is changed on resource level
begin
require 'bundler/inline'
rescue LoadError => e
STDERR.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
begin
require 'bundler/inline'
rescue LoadError => e
STDERR.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
begin
require 'bundler/inline'
rescue LoadError => e
STDERR.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
begin
require 'bundler/inline'
rescue LoadError => e
STDERR.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
begin
require 'bundler/inline'
rescue LoadError => e
STDERR.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
@senid231
senid231 / jsonapi-test1.go
Created April 17, 2017 11:38
testing github.com/google/jsonapi - relation's attributes not populated from included data
package main
import (
"bytes"
"encoding/json"
"fmt"
"github.com/google/jsonapi"
)
@senid231
senid231 / bug-belongs-to-overriden-pkey.rb
Created April 20, 2017 14:07
bug with linkage to_one belongs_to relationship with overridden primary_key
begin
require 'bundler/inline'
rescue LoadError => e
STDERR.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
echo '# rbenv setup' > /etc/profile.d/rbenv.sh
echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh
echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
chmod +x /etc/profile.d/rbenv.sh
source /etc/profile.d/rbenv.sh
git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build
rbenv install 1.9.3-p392
@senid231
senid231 / jsonapi_resources_bug_report_include_polymorphic.rb
Created September 6, 2017 15:48
bug in jsonapi_resources master (tested after commit 38757c631e4d0e420830a8cfba52cfae48cc8a86). when fetch with including polymorphic association it fails with 500
begin
require 'bundler/inline'
require 'bundler'
rescue LoadError => e
STDERR.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true, ui: ENV['SILENT'] ? Bundler::UI::Silent.new : Bundler::UI::Shell.new) do
source 'https://rubygems.org'
# Run this in your shell to install a set of atom-plugins
# for working with rust projects and git
# Rust essentials
apm install language-rust racer linter linter-rust build build-cargo cargo-test-runner rust-api-docs-helper
# Other
apm install keyboard-localization autoupdate-packages project-manager atom-terminal minimap docblockr theme-switcher
# Git