Skip to content

Instantly share code, notes, and snippets.

var form = $('<form>').attr('target', '_top').attr('method', 'GET').attr('action', "/YEAHBITCH");
$('body').append(form);
form.submit();
db().open(function (db) {
db.collection('users', function(err, collection) {
collection.findOne({'username': self.params.get.username}, function (err, result) {
if(!result) {
var newUser = new User(self.params.get.username)
collection.insert([newUser.toJSON()], function(docs) {
db.close();
puts("Created new user: "+newUser.username)
self.halt(200, JSON.encode(newUser))
})
cd ~/"Library/Application Support/TextMate/Bundles/"
git clone git://github.com/johnmuhl/nginx-tmbundle.git Nginx.tmbundle
osascript -e 'tell app "TextMate" to reload bundles'
/*
* First (promising) results from my 'Semantic Categorizer' which I use to classify interests.
* This example run takes the word 'Ruby' which has 2 main meanings (programming language
* and gem stone) and tries to rank the categories of both meanings. The more recursive
* the searches, the more abstract the categories.
*
* This run is using still very crude and yet incomplete Wikipedia category hierarchies.
* It runs on a highly performing combination of MongoDB and NodeJS, but it's still
* not fast enough. Soon this system must be able to hundreds of classifications per second.
*
def loop_dir(dir)
Find.find(dir) do |path|
next if path == '.'
yield(path) unless ignore_path?(path)
end
end
def ignore_path?(path)
@ignored_path_regexes.detect { |regex| File.basename(path).match(regex) != nil }
end
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 357 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: /data/github/current/lib/github.rb:34: undefined method `env' for Rails:Module (NoMethodError)
remote: from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
remote: from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
remote: from /data/github/current/lib/rock_queue.rb:46
remote: from hooks/post-receive:14:in `require'
<script type="text/javascript">
flutterscape_category = "anime";
flutterscape_options = {'include_price': true}; // Optional: include product price
</script>
<script type="text/javascript" src="http://flutterscape.com/scripts/widget/load.js"></script>
<script type="text/javascript">
flutterscape_seller = "mooshu888";
//flutterscape_options = {'no_avatar': true}; // Optional: hide the username/avatar
</script>
<script type="text/javascript" src="http://flutterscape.com/scripts/widget/load.js"></script>
<script type="text/javascript">
flutterscape_group_id = 5;
</script>
<script type="text/javascript" src="http://flutterscape.com/scripts/widget/load.js"></script>
<script type="text/javascript">
flutterscape_group_id = 5;
//flutterscape_referral_code = 'XXX';
</script>
<script type="text/javascript" src="http://flutterscape.com/scripts/widget/load.js"></script>