Skip to content

Instantly share code, notes, and snippets.

View kenjione's full-sized avatar

Alex Chernyshev kenjione

View GitHub Profile
if [ -f "$(brew --prefix bash-git-prompt)/share/gitprompt.sh" ]; then
export __GIT_PROMPT_DIR="$(brew --prefix bash-git-prompt)/share/"
source "$(brew --prefix bash-git-prompt)/share/gitprompt.sh"
fi
@kenjione
kenjione / permit_recursive_params.out
Created August 17, 2016 11:13 — forked from koenpunt/permit_recursive_params.out
ActionController::Parameters -> permit_recursive_params
{"tree"=>
{"name"=>"Australia",
"value"=>39904,
"id"=>6,
"description"=>"",
"string_array"=>["one", "two"],
"array_with_hashes"=>[{"a"=>"1"}, {"a"=>"2"}],
"type"=>{"name"=>"Other", "icon"=>"<i class=\"fa fa-pagelines\"></i>"},
"children"=>
[{"name"=>"Boxes",
@kenjione
kenjione / workaround.md
Created July 5, 2016 11:54 — forked from kgrz/workaround.md
Possible workaround for installing nokogiri 1.6.8 on OSX with brewed libxml2 2.9.4

Problem:

The following commands fail on OSX:

gem install nokogiri
gem install nokogiri -- --use-system-libraries
gem install nokogiri -- --use-system-libraries --with-xslt-dir=/usr/local/opt/libxslt --with-xml2-dir=/usr/local/opt/libxml2

Version:

@kenjione
kenjione / gist:fcad94ad7417d434eb67
Created June 18, 2015 19:20
Broken Postgres install
some folders disappear
mkdir /usr/local/var/postgres/pg_tblspc
mkdir /usr/local/var/postgres/pg_twophase
mkdir /usr/local/var/postgres/pg_stat_tmp
mkdir /usr/local/var/postgres/pg_replslot
mkdir /usr/local/var/postgres/pg_serial
mkdir /usr/local/var/postgres/pg_snapshots
@kenjione
kenjione / gist:7572202
Last active December 28, 2015 22:29
.irbrc
require 'rubygems'
require 'ap'
require 'irb/completion'
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
IRB::Irb.class_eval do
def output_value
ap @context.last_value
end
@kenjione
kenjione / gist:4327673
Created December 18, 2012 12:47
moderation data
1.9.3p194 :009 > puts m.data
---
:create:
:attributes:
id:
name: Диван сочный
description: ''
rubric_id: 140
brand_id: 5
style_id: 7
@kenjione
kenjione / gist:4327661
Created December 18, 2012 12:45
schema
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).