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
#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]) |
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
# 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 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 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 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 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 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 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
'Caught in the act!' said I, tapping him lightly on the shoulder. Then I ran up the steps, and the disinterested devotion on the servants' faces in the ha"ll delighted me like an unexpected treat. I looked at them all, one after another, while they took my greatcoat off and wiped my shoes clean. | |
And he stood completely unsupported and kicked his legs. He was radiant with insight. | |
And it had taken me such a long time in this man's company to recognize the same old game. I rubbed my finger tips together to wipe away the disgrace. | |
For such reasons, supposing one wanted to keep up correspondence with him, one could not send him any real news such as could frankly be told to the most distant acquaintance. It was more than three years since his last visit, and for this he offered the lame excuse that the political situation in Russia was too uncertain, which apparently would not permit even the briefest absence of a small businessman while it allowed hundreds of thousands of Russians to travel peacefully abroad. Bu |
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
Axelrod really wanted me to do this on teleprompter -- but I told him I'm much better when I wing it. I know these evenings run long, so I'm going to be brief. Talk about the audacity of hope. President Obama does send his greetings, though. He can't be here tonight -- because he's busy getting ready for Easter. He thinks it's about him | |
My record stands for itself. I never say anything I don't mean. Everybody knows whatever I say, I do. And my whole life has been devoted to leveling the playing field for middle-class people, giving them an even break, treating Main Street and Wall Street the same, holding the same responsibility. Look at my record. It's been all about the middle class. They're the people who grow this country. We think you grow this country from the middle out, not from the top down. | |
My fellow Democrats, and my favorite Democrat. | |
Jilly, I want you to know that Beau, Hunt, Ashley, and I are so proud of you. We admire the way you treat every single student who walks into your classroom. You not |
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
Install | |
============= | |
Here's what you need to know to get a laptop to run HedyNet locally. The following notes were assembled on a Mac running OSX 10.7.5, Macports, and Python 2.7.1. It assumes you have figured out how to download a copy of HedyNet from github. | |
Requirements | |
----------------- | |
(see the requirements files in the requirements/ folder) | |
- Pip |
OlderNewer