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(){ | |
| var s=0,w=window,k=[38,38,40,40,37,39,37,39,66,65]; | |
| $(w).keydown(function(e){ | |
| if((e.keyCode==k[s]?++s:s=0)>9)w.location="http://53cr.com/secret"; | |
| }); | |
| })(); |
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
| (ns application.config.routes | |
| (:use skyway)) | |
| ;(require 'application.controllers.login) | |
| (def my-ns *ns*) | |
| (defroutes application-routes | |
| (GET "/login" (binding [*ns* my-ns] | |
| (require 'application.controllers.login) | |
| (application.controllers.login/invoke))) |
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
| # -*- coding: utf-8 -*- | |
| # Proposed solution to ruby 1.9's multibyte chars. | |
| # -- just let ruby handle it, at least initially. | |
| # -- not many that we're calling ActiveSupport methods | |
| # -- on will have non-ascii characters anyway. | |
| # useless performance metrics (on my macbook) | |
| # ====================================+======= | |
| # String#ascii_only? | 0.22µs | |
| # String#force_encoding("ASCII-8BIT") | 0.60µs |
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
| import Text.ParserCombinators.Parsec | |
| import Text.ParserCombinators.Parsec.Token | |
| import Text.ParserCombinators.Parsec.Language (emptyDef) | |
| -- User input should always be on one line. It'll have three distinct parts: | |
| userInput :: Parser (Amount, String, [String]) | |
| userInput = do{ gq <- (genericQuantifier <|> return (Serving, 1)) | |
| ; skipMany space | |
| ; sq <- specificQuantifier |
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
| begin | |
| require 'rubygems' | |
| rescue LoadError;end | |
| %w{net/http uri nokogiri ruby-growl yaml prowl}.each{|e|require e} | |
| class EveNotifier | |
| GROWL = { | |
| :host => "espresso.h", | |
| :password => "tr32" |
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 'date' | |
| class EveCentral | |
| attr_reader :item_orders | |
| def get_new_db | |
| `rm latest_db.dump*` | |
| puts "--> downloading new database file..." |
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 'date' | |
| # Shows the highest potential markup for items. Doesn't really filter out spam inputs. | |
| # top listed items | |
| # >> puts orders.keys.sort_by{|n|orders[n].map{|e|e[:vol_enter]||1}.inject(&:+)}.reverse[0..10] | |
| # >> orders[f].select{|e|e[:bid]==:buy}.map{|e|e[:price]} | |
| # => [201000, 200002, 200002, 200001, 199999, 65000, 51003, 51003, 51003, 51000, 30000, 5555] |
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
| --- | |
| 30000902: 24 | |
| 30001935: 58 | |
| 30002968: 18 | |
| 30004001: 34 | |
| 30005034: 13 | |
| 30045321: 9 | |
| 30001419: 9 | |
| 30002452: 17 | |
| 30003485: 15 |
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
| # Jumps to Jita! | |
| jumps = {} | |
| puts "processing database..." | |
| File.open('jumps.dump','r') do |f| | |
| until f.eof? | |
| line = f.readline.strip | |
| if line == "/*!40000 ALTER TABLE `mapSolarSystemJumps` DISABLE KEYS */;" | |
| until ((line=f.readline.strip).size<20) |
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
| // File: instructions.c | |
| // Author: Burke Libbey | |
| // Modified: <2009-10-08 15:13:59 CDT> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include "bitmacros.h" | |
| #include "instructions.h" |