class FlatArray
attr_reader :nested_array, :flatten_array
def initialize(nested_array = [])
@nested_array = nested_array
@flatten_array = []
end
def call
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.
[user]
name = g-ilham
email = [email protected]
helper = osxkeychain
[color]
branch = auto
diff = auto
pager = true
rails new name_of_project -d postgresql -J --skip-turbolinks --no-skip-javascript -T -B -C
-d
- is for defenition of database
-J --skip-turbolinks
- is for skip turbolinks
-T
- is for skip creation a /test
folder
-B
- is for skipping running bundle after create folders
#Instruction by instalation through Google Storage
sudo apt-get install unzip
wget -N http://chromedriver.storage.googleapis.com/<your_version>/chromedriver_linux<your_bit>.zip
unzip chromedriver_linux<your_bit>.zip
chmod +x chromedriver
sudo mv -f chromedriver /usr/local/share/chromedriver
OSX Mavericks has been crashing randomly recent to me. Just very random. Not quite good because it doesn't give it the chance for processes like Postgres, etc... to shut down properly, leaving process ids (PIDs) behind.
Now got this issue where my postgres won't boot up.
Running postgres manually doesn't work
> pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
> pg_ctl: another server might be running; trying to start server anyway
So here's a quick fix.
log in on psql console:
sudo -u postgres psql postgres
\q
- quit ini console
\l
- databases
\c mydb
- use this db
\dt
- tables
http://jsfiddle.net/6FZkk/1/ | |
http://stackoverflow.com/questions/6887183/how-to-take-screen-shot-of-a-div-with-javascript | |
http://html2canvas.hertzen.com/examples.html | |
OTHER | |
http://stackoverflow.com/questions/16894683/how-to-print-html-content-on-click-of-a-button-but-not-the-page | |
http://stackoverflow.com/questions/2255291/print-the-contents-of-a-div | |
http://stackoverflow.com/questions/468881/print-div-id-printarea-div-only | |
http://sarwarhossain.com/2010/10/05/print-a-div-open-new-window-print-and-close-using-javascirpt/ |
http://webfont.ru/font/adine - "DASCASC" выпирающий шрифт, я его использую в проекте | |
http://webfont.ru/font/champignon - "blyad work" - выпирающий шрифт | |
http://webfont.ru/font/classica-one - "adsadff" - выпирающий шрифт | |
http://webfont.ru/font/christmas-script - "adsffffF" - выпирающий шрифт | |
сервис для футболок: | |
http://www.customink.com/lab#loc-singles | |
http://www.spreadshirt.ca/custom-t-shirts-C8579/lpDesigner | |
- https://learn.javascript.ru/font-size-line-height - пояснение на русском об этом |
require 'benchmark'
cube = Cube.find(93)
Benchmark.bmbm do |x|
x.report("all_cube_images") { Image.all_cube_images(1, 93) }
x.report("cube.images") { cube.images }
end.each do |el|