- export PYTHONPATH=/Users/rolandtanglao/Documents/MOZILLA_MESSAGING/KITSUNE/TIKI_TO_KITSUNE_CONVERSION_CODE/pcraciunoiu-kitsune-531b784/apps
- get the KB article text files as .txt files from Gozer, see bug 6345657
for i in *.txt; do cat "$i" | ~/Documents/MOZILLA_MESSAGING/KITSUNE/TIKI_TO_KITSUNE_CONVERSION_CODE/kitsune/apps/sumo/convertSuMoMoKBfiles.py 1> CONVERTED_TO_KITSUNE/"$i".stdout.txt 2> CONVERTED_TO_KITSUNE/"$i".stderr.txt; done
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
var db = new mongo.Db('mydatabase', new mongo.Server("127.0.0.1", 27017, {})); | |
db.open(function(e, db) { | |
get('/', function() { | |
var $this = this | |
db.collection('some-collection', function(e, col){ | |
col.find({}, {}, function(e, items) { | |
items.each(function(err, item) { | |
sys.puts(sys.inspect(item)) | |
}) |
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 'json' | |
require 'net/http' | |
require 'pp' | |
require 'Time' | |
require 'uri' | |
require 'parseconfig' | |
flickr_config = ParseConfig.new('flickr.conf').params | |
api_key = flickr_config['api_key'] |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
<title>Roland's Vancouver Geotagged Cameraphone Pics</title> | |
</head> | |
<body> | |
<div id="cm-example" style="width: 800px; height: 600px"></div> | |
<script type="text/javascript" src="http://tile.cloudmade.com/wml/latest/web-maps-lite.js"></script> | |
<script type="text/javascript" src="vancouver-sample-points.js"></script> |
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 'net/http' | |
require 'uri' | |
require 'xmlsimple' | |
require 'pp' | |
require 'json' | |
#pp data["variable"][6]["statistic"][0]["rgb"] # or "hex" or "value" | |
ARGF.each_line do |line| |
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
# the trick is to escape any double quotes in the $where queries with "\" i.e %5C | |
http://localhost:27080/gs/topics/_find?criteria=%7B%22%24where%22%3A%22this.fulltext.indexOf%28%5C%22comcast%5C%22%29%20%21%3D%20-1%20%26%26%20this.fulltext.indexOf%28%5C%22send%5C%22%29%20%21%3D%20-1%22%7D&fields=%7B%22at_sfn%22%3A%221%22%7D&sort=%7B%22last_active_at%22%3A%22-1%22%7D | |
# or using CURL: | |
curl -X GET 'http://localhost:27080/gs/topics/_find?criteria=%7B%22%24where%22%3A%22this.fulltext.indexOf%28%5C%22comcast%5C%22%29%20%21%3D%20-1%20%26%26%20this.fulltext.indexOf%28%5C%22send%5C%22%29%20%21%3D%20-1%22%7D&fields=%7B%22at_sfn%22%3A%221%22%7D&sort=%7B%22last_active_at%22%3A%22-1%22%7D' |
- cd to the directory with the articles from :gozer bug 634657
- assuming all the images in articles aren't spam, then find all the unique images in the articles:
egrep -h -o '{img src="img/wiki_up/[^-]*-[^-]*-[^-]*-[^\.]*.(jpeg|jpg|png|PNG|JPG)[^&]*"[a-zA-Z0-9 &;=}]*' * | sort | uniq > unique_sumomo_images_1march_2011.txt
[file0]egrep -o '[0-9a-f]{32}-[0-9]{10}-[0-9]{1,3}-[0-9]{1}.(png|PNG|jpg|JPG|jpeg|JPEG|gif|GIF)' unique_sumomo_images_1march_2011.txt > just.unique.image.filenames.1march2011.txt
[file1]
- open up those images from :sancus bug 634667 in [file1] and see if any are spam, if so update [file1] by removing them from [file1]
- find the spam images by removing the known good images from [file1]
var=`cat /Users/rolandtanglao/Documents/MOZILLA_MESSAGING/KITSUNE/TIKI_WIKI_ARTICLES/sumo/just.unique.image.filenames.1march2011.txt`
- `grep -v "$var
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
/** | |
* Start by cloning git://github.com/technoweenie/twitter-node, then | |
* save this file in the same directory as the clone, edit the login | |
* information, and run it with: | |
* | |
* $ node twitter-fx4.js | |
* | |
* then sit back and watch! | |
*/ | |
var twitter = require('./twitter-node/lib/twitter-node'), |
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
read 1 line and then replace Firefox with Thunderbird: | |
msgid "Love Firefox and have a few moments to help?<br /> Help other Firefox users on Twitter. Good things will come to those who tweet!" | |
msgid "Sign in with <mark>Twitter</mark>" | |
msgid "Want to go beyond 140 characters? <a href=\"%(join_url)s\">Join the support community</a> and help many more Firefox users." | |
msgid "Firefox Support Home Page" | |
msgid "Need Help With <mark>Firefox?</mark>" | |
msgid "Firefox Sync Support Home Page" | |
msgid "Need Help With <mark>Firefox Sync?</mark>" | |
msgid "Firefox Help" |
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
msgid "Show content only for specific versions of Firefox or operating systems." | |
exceptions: | |
* note that in Polish, instead of Firefox->Thunderbird Firefox, Firefox ->Thunderbirda because the Polish organizers have decided to decline foreign language nouns like Thunderbird and Firefox (AFAIK no other locales have done that) |
OlderNewer