This file contains hidden or 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
| #scraper requires the SSN scraped babynames dataset from infochimps | |
| #www.infochimps.com/datasets/popular-baby-names-by-year-top-1000-us-social-security-administr | |
| require 'nokogiri' | |
| for year in (1880..2009) | |
| f = File.open("babynames/top-1000-#{year}-num.html") | |
| html = f.read | |
| doc = Nokogiri::HTML(html) |
This file contains hidden or 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
| ## just for context, here's the Directory entry from /etc/apache2/httpd.conf | |
| <Directory /> | |
| Options FollowSymLinks | |
| AllowOverride All | |
| Order deny,allow | |
| Deny from all | |
| </Directory> | |
| # Turn on mod_rewrite |
This file contains hidden or 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
| [{"Rank":1,"Title":"Da Vinci Code,The","Author":"Brown, Dan","Volume Sales":"5,094,805","Editions Combined":7,"Imprint":"Corgi Books","Publisher":"Transworld Grp","Publication Date":"Monday, March 1, 2004","Genre":"F2.1 Crime, Thriller & Adventure"}, | |
| {"Rank":2,"Title":"Harry Potter and the Deathly Hallows","Author":"Rowling, J.K.","Volume Sales":"4,475,152","Editions Combined":8,"Imprint":"Bloomsbury Publishing PLC","Publisher":"Bloomsbury Grp","Publication Date":"Saturday, July 21, 2007","Genre":"Y2.1 Children's Fiction"}, | |
| {"Rank":3,"Title":"Harry Potter and the Philosopher's Stone","Author":"Rowling, J.K.","Volume Sales":"4,200,654","Editions Combined":8,"Imprint":"Bloomsbury Publishing PLC","Publisher":"Bloomsbury Grp","Publication Date":"Thursday, June 26, 1997","Genre":"Y2.1 Children's Fiction"}, | |
| {"Rank":4,"Title":"Harry Potter and the Order of the Phoenix","Author":"Rowling, J.K.","Volume Sales":"4,179,479","Editions Combined":5,"Imprint":"Bloomsbury Publishing PLC","Publisher":"Bloomsbury Grp","Publ |
This file contains hidden or 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
| SELECT wp_users.user_login, wp_users.user_nicename, wp_users.user_email | |
| GROUP_CONCAT(CONCAT(meta_key, ": ", meta_value)), | |
| FROM wp_users JOIN wp_usermeta ON wp_users.id = wp_usermeta.user_id | |
| GROUP BY wp_users.user_login; |
This file contains hidden or 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
| find . -type f \( -iname "*.cpp" -or -iname "*.java" \) |
This file contains hidden or 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
| # from IRB | |
| require 'rexml/document' | |
| include REXML | |
| doc = Document.new(File.new('Strings.xml')) | |
| elements = doc.root.elements.collect | |
| # Get a wordcount: |
This file contains hidden or 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
| #This script will change the existing card database for wagn so that the root template card specifies that reads will require an authenticated user rather than anonymous access as was the default | |
| # The role encapsulating read needs authenticated user | |
| Card.find_by_name("Basic+*tform").permit(:read, Role[:auth]) |
NewerOlder