- Thermometer
- Barometer
- Plug PC: One that has a battery, networking and can be connected to a wall socket. Refer: [Plug computer][1] OR [Intel Compute Stick][2] (but of course with Linux)
- Water purifier
- Induction cooker
- AC
- Pen drive
- Hard disk
- Desktop speakers
- Car entertainment sets (MP3 player + speakers)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'curb' | |
require 'nokogiri' | |
require 'date' | |
CURRENT_DATE = Date.today.strftime("%Y-%-m-%d") | |
link = "http://www.hongkongairport.com/flightinfo/eng/real_arrinfo.do?fromDate<wbr>=#{CURRENT_DATE}" | |
USER_AGENT = "Mac / Firefox 29: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:29.0) Gecko/20100101 Firefox/29.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Email Email | |
Land Land | |
Mobile Mobile | |
Address Address | |
FeedBack FeedBack | |
Enter (case Enter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original | |
movies.group_by do |movie| | |
movie.genre | |
end.map do |month, list| | |
[month, list.size] | |
end.sort_by(&:last).reverse | |
# Alternative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
/* ========================================================================== | |
HTML5 display definitions | |
========================================================================== */ | |
/** | |
* Correct `block` display not defined in IE 8/9. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ZAlgorithm | |
def z | |
@z = Array.new(length, 0) | |
@z[0] = length | |
left = right = 0 | |
(1...length).each do |k| | |
if k > right | |
@z[k] = length_of_longest_prefix(k) | |
unless @z[k].zero? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function()%7Bvar%20el=document.createElement(%22div%22),b=document.getElementsByTagName(%22body%22)%5B0%5D,otherlib=!1,msg=%22%22;el.style.position=%22fixed%22,el.style.height=%2232px%22,el.style.width=%22220px%22,el.style.marginLeft=%22-110px%22,el.style.top=%220%22,el.style.left=%2250%25%22,el.style.padding=%225px%2010px%22,el.style.zIndex=1001,el.style.fontSize=%2212px%22,el.style.color=%22%23222%22,el.style.backgroundColor=%22%23f99%22;function%20showMsg()%7Bvar%20txt=document.createTextNode(msg);el.appendChild(txt),b.appendChild(el),window.setTimeout(function()%7Btxt=null,typeof%20jQuery==%22undefined%22?b.removeChild(el):(jQuery(el).fadeOut(%22slow%22,function()%7BjQuery(this).remove()%7D),otherlib&&(window.$jq=jQuery.noConflict()))%7D,2500)%7Dif(typeof%20jQuery!=%22undefined%22)return%20msg=%22This%20page%20already%20using%20jQuery%20v%22+jQuery.fn.jquery,showMsg();typeof%20$==%22function%22&&(otherlib=!0);function%20getScript(url,success)%7Bvar%20script=document.createElement(%22script%22) |
root@ec077b3b57b7:/app# netstat -ln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:9393 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:2323 0.0.0.0:* LISTEN
tcp6 0 0 ::1:2323 :::* LISTEN
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sequential_array = [*0..23] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'open-uri' | |
require 'nokogiri' | |
google_query_url = 'http://www.google.co.in/search?&q=' | |
search_query = 'drath note' | |
if ARGV.length == 0 then | |
puts "usage: suggest <approx> <wrds> <to> <srch>" |