-
-
Save mikedao/784c44d9e9aac1069a9e to your computer and use it in GitHub Desktop.
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
Get all requests that match :identifier | |
get matching user_agent_ids | |
get matching user_agent | |
os = user_agent.split(' ')[1] | |
count requests that match os | |
create hash {os => count } | |
display os[1..-2] + count |
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
1. Get all requests that match :identifier. | |
2. Get all url_ids.uniq | |
3. For each url_id count requests | |
4. Create hash {url_id => number of requests} | |
5. Sort hash by value | |
6. Display url that matches url_id and number of requests |
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
1. Get all requests that match :identifier | |
2. get matching user_agent_ids | |
3. get matching user_agent | |
4. browswer = user_agent.split(' ')[0] | |
5. set up hash {browser => #of occurrences} | |
6. Sort hash by values | |
7. display browser + occurrences |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment