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
| require 'rubygems' | |
| require 'twitter' | |
| require 'json' | |
| require 'net/http' | |
| def term_search(screen_name, needle) | |
| (0..9999999).each do |i| | |
| puts "Page #{i} Search" |
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
| <!-- Place in your header after your current CSS declarations --> | |
| <style type="text/css" media="screen"> | |
| #qrcode{display: none;} | |
| </style> | |
| <style type="text/css" media="print"> | |
| #header, #sidebar, #respond, .social-bar, .author-links, #footer, #comments{display: none;} | |
| #qrcode{display: block;} |
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
| server { | |
| listen 80; | |
| server_name www.wordpress-domain-name.com; | |
| root /var/www/wordpress; | |
| index index.php; | |
| try_files $uri $uri/ /index.php; | |
| location /rails { | |
| passenger_min_instances 2; |
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
| require 'rubygems' | |
| require 'yajl' | |
| file = File.new('bbPosts.json', 'r') # file with more than one json | |
| # Boing Boing Titles | |
| parser = Yajl::Parser.new | |
| parser.parse(file) do |file| | |
| file.each do |post| |
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
| require 'rubygems' | |
| require 'open-uri' | |
| require 'nokogiri' | |
| count = 0 | |
| def get_submissions(ident, count) | |
| xml = Nokogiri::XML(open("http://www.reddit.com/new/.xml?count=25&after=t3_#{ident}")) | |
| puts "\n\nhttp://www.reddit.com/new/.xml?count=25&after=t3_#{ident}" |
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
| require 'rubygems' | |
| require 'classifier' | |
| require 'madeleine' | |
| m = SnapshotMadeleine.new("#{RAILS_ROOT}/bayes_data") { | |
| Classifier::Bayes.new 'Boingable', 'Unboingable' | |
| } | |
| # Boing Boing Titles |
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
| function sendChatterMessage(sfdc_base_url, message_text){ | |
| $jquery('<iframe />', { | |
| name: 'chatterFrame', | |
| id: 'chatterFrame', | |
| width: '800px', | |
| height: '800px', | |
| src: 'https://' + sfdc_base_url + '/_ui/core/chatter/ui/ChatterPage' | |
| }).appendTo('body'); | |
| $jquery('#chatterFrame').load(function(){ |
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
| Set File system Read ahead to 4096 | |
| blockdev --setra 4096 /dev/sda1 | |
| Filesystem tests run at 256, 4096 and 8192 each tested with | |
| bonnie++ -f -n 0 -c 4 -u root | bon_csv2html > ir-results-8192.html | |
| Run /services/postgres-tuning/determine_postgres_memory.sh on machine (copy via SFTP) |
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
| <div class='ip-industry-lookup'> | |
| <div data-industry='healthcare'> | |
| Our hospital saved 10x | |
| </div> | |
| <div data-industry='construction'> | |
| We built 50% more in 20% less time | |
| </div> |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> | |
OlderNewer