http://wiki.nginx.org/HttpLuaModule#Installation
install LuaJIT
$ brew install luajit
download ngx_devel_kit
http://wiki.nginx.org/HttpLuaModule#Installation
install LuaJIT
$ brew install luajit
download ngx_devel_kit
| set nocompatible | |
| filetype off | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| set tabstop=2 | |
| set shiftwidth=2 | |
| set softtabstop=2 | |
| set smarttab | |
| set expandtab | |
| set number |
| a = [88, 105, 3, 2, 200, 0, 10] | |
| a.delete_if {|num| num > 99} # [88, 3, 2, 0, 10] | |
| #a.sort #[0, 2, 3, 10, 88] | |
| c = [] | |
| range = 0..99 | |
| range.each do |x| | |
| c << x unless a.include?(x) | |
| end | |
| c.each_with_index do |v, i| |
| #INPUT: | |
| [[1,2,3], [4,5,6],[7,8,9]] | |
| l = [[1,2,3], [4,5,6],[7,8,9]] | |
| l.length | |
| l[0].zip(l[1], l[2]) | |
| #OUTPUT: |
| http://www.geeksforgeeks.org/subtract-two-numbers-without-using-arithmetic-operators/ | |
| http://zetcode.com/lang/rubytutorial/expressions/ |
| # Let me do it later |
| p "Please provide a number to find the square root" | |
| number = gets.chomp | |
| end_number = number.to_i | |
| start_number = 1 | |
| result = 0 | |
| (start_number..end_number).each do |sq_num| | |
| result += end_number | |
| end |
| # Get the highly repeated word in the given text with count | |
| # Get the count of given word (text) in the text | |
| text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum." | |
| words = text.split | |
| frequencies = Hash.new(0) | |
| words.each {|w| frequencies[w] += 1 } | |
| result = frequencies.sort_by{|k,v| v}.reverse |
| Gem file: | |
| Gem rails -v | |
| Remove assests and add the following default rails | |
| gem 'sass-rails', '~> 4.0.3' | |
| gem 'uglifier', '>= 1.3.0' | |
| gem 'coffee-rails', '~> 4.0.0' | |
| Error 1: | |
| Check whether all gems in Gemfile are compatible with all their dependencies. |
| -- -- -- Data Migration For Organizor -- -- -- | |
| -- What is it? | |
| -- List of SQL queries to migrate data from old database to the newly designed database. | |
| -- It has been classified into two levels | |
| -- 1. Level 1 (which will be in top of database hierarchy) | |
| -- 2. Level 2 (which will be depend on the Level 1 tables) | |
| -- Prerequisites for data migration | |
| -- Login into MySQL prompt |