class FlatArray
attr_reader :nested_array, :flatten_array
def initialize(nested_array = [])
@nested_array = nested_array
@flatten_array = []
end
def call
Please unplug the device. Get a temporary internet connection by ethernet, tethered or whatever means possible. Open a terminal and do: | |
sudo apt-get install git linux-headers-generic build-essential | |
git clone https://github.com/porjo/mt7601.git | |
cd mt7601/src | |
make | |
sudo make install | |
sudo mkdir -p /etc/Wireless/RT2870STA/ | |
sudo cp RT2870STA.dat /etc/Wireless/RT2870STA/ | |
sudo depmod -a |
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 = ilgamgaysin@gmail.com
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
devise erb to slim convert | |
https://github.com/plataformatec/devise/wiki/How-To%3a-Create-Haml-and-Slim-Views | |
Create Slim views | |
We use a gem called 'html2slim' to create the Slim-views. | |
gem install html2slim | |
This package include a tool called erb2slim which can convert erb file to slim recursively. Option -d for delete the erb file after the convert finished. |
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/ |