by Angel Leon. March 17, 2015;
Last update on December 14, 2023
Updated on February 27, 2023
Updated August 29, 2019.
| /***************************************** | |
| /* DOM touch support module | |
| /*****************************************/ | |
| if (!window.CustomEvent) { | |
| window.CustomEvent = function (event, params) { | |
| params = params || { bubbles: false, cancelable: false, detail: undefined }; | |
| var evt = document.createEvent('CustomEvent'); | |
| evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); | |
| return evt; | |
| }; |
| (function (exports) { | |
| /** | |
| * Dependencies | |
| * - jsbn.js | |
| * - jsbn2.js | |
| * - prng4.js | |
| * - ec.js | |
| * - sec.js | |
| * - rng.js |
| #!/usr/bin/env ruby -w | |
| # brew-services(1) - Easily start and stop formulas via launchctl | |
| # =============================================================== | |
| # | |
| # ## SYNOPSIS | |
| # | |
| # [<sudo>] `brew services` `list`<br> | |
| # [<sudo>] `brew services` `restart` <formula><br> | |
| # [<sudo>] `brew services` `start` <formula> [<plist>]<br> |
| // Copyright (c) 2013 Amanieu d'Antras | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: | |
| // | |
| // The above copyright notice and this permission notice shall be included in |
| // Make sure the socket is coming from our app by matching the session id | |
| socketServer.set('authorization', function (data, accept) { | |
| cookieParser(data, {}, function(err) { | |
| if (err) { | |
| accept(err, false); | |
| } else { | |
| config.sessionStore.load(data.signedCookies[config.sessionKey], function(err, session) { | |
| if (err || !session) { | |
| accept('Session error', false); | |
| } else { |
| require 'rack' | |
| ## | |
| # Tries to calculate size of the complete response. | |
| # This middleware should be chained in front of everything else. | |
| # Middleware taking care of compression, etag handling etc could | |
| # produce wrong results. | |
| # | |
| # Leaves streaming intact and does work file bodies from sockets | |
| # and files. |
| require "rubygems" | |
| require "datamapper" | |
| DataMapper.setup(:default, "sqlite::memory:") | |
| DataMapper::Logger.new(STDOUT, :debug) | |
| class Recipe | |
| include DataMapper::Resource | |
| property :id, Serial |
| <?php | |
| class item { | |
| public $player_id, $ids, $sql, $vars = array(); | |
| private $functions = array(); | |
| function __construct($sql=null) { | |
| $this->sql = $sql; | |
| $this->sql->query('SHOW FIELDS FROM items'); | |
| for($x=0;$x<$this->sql->rows;$x++) { | |
| $this->sql->fetch($x); |
| # I turned the script into a Ruby gem. To install it, first install Rubygems if you haven't already. Instructions are here: https://rubygems.org/pages/download. Next type: sudo gem install trades | |
| # | |
| # To run the script type: | |
| # trades | |
| # | |
| # Or if you only want to see trades from specific exchanges: | |
| # trades mtgoxUSD thUSD britcoinGBP | |
| # | |
| # You can specify as many exchanges as you want. Just make sure you use the same name Bitcoincharts uses. | |
| # |