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
@-moz-document url("chrome://browser/content/devtools/markup-view.xhtml") { | |
body { font-size: 15px !important; font-family: monospace !important; background: linear-gradient(#282828, #111) !important; background-attachment: fixed !important; } | |
.editable, .codebox { color: #ccc !important; } | |
.tagname { color: #f5a !important; } | |
.attrname { color: #5af !important; } | |
.attrvalue { color: #fa5 !important; } | |
.editable:focus { outline: none !important;} | |
.attreditor:hover { border-bottom: 1px dotted #ccc !important; } | |
.theme-selected { background: transparent !important;} | |
.theme-selected:after { content: ''; position: absolute; top: 0; left: -4000px; width: 8000px; height: 100%; z-index: -1; border: 1px solid #555; background: linear-gradient(#000,#111); } |
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
@keyframes nodeInserted { | |
from { clip: rect(1px, auto, auto, auto); } | |
to { clip: rect(0px, auto, auto, auto); } | |
} |
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
body { | |
background: #222 | |
} | |
div { | |
height: 200px; | |
width: 200px; | |
position:absolute; | |
background: #f51; | |
transition: left .5s ease; |
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
body { | |
background: #222 | |
} | |
div { | |
height: 200px; | |
width: 200px; | |
position:absolute; | |
background: #f51; | |
transition: left .5s ease; |
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
// ==UserScript== | |
// @name github-wrap-toggle | |
// @namespace silverwind | |
// @include /^https?://github.com/ | |
// @version 1 | |
// @grant GM_addStyle | |
// ==/UserScript== | |
var $ = document.querySelectorAll.bind(document); | |
NodeList.prototype.__proto__ = Array.prototype; |
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
double GetPvESpellHitRate(byte playerLevel, byte targetLevel, byte spellLevel, uint attackerCount) | |
{ | |
double hitrate; | |
if ( playerlevel > targetLevel) // Player > Mob, no base miss rate, 0.5% miss per spelllevel lower than moblevel | |
hitrate = 1 + (spellLevel - targetLevel)/200); | |
else if ( targetLevel == playerlevel) // Player == Mob, 15% base miss rate, 0.5% miss per spelllevel lower than moblevel | |
hitrate = 0.85 + (spellLevel - targetlevel)/200); | |
else // Player < Mob, guessed formula | |
{ | |
if ( spellLevel > targetLevel) return 1; // Just a safety check so we don't sqrt a negative number. this should never happen as a player cannot have higher spells than his level is |
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
float GetPvESpellHitRate(byte playerLevel, byte targetLevel, byte spellLevel) | |
{ | |
float hitrate; | |
if ( playerlevel > targetLevel) // Player > Mob, no base miss rate, 0.5% miss per spelllevel lower than moblevel | |
hitrate = 1 + (spellLevel - targetLevel)/200); | |
else if ( targetLevel == playerlevel) // Player == Mob, 15% base miss rate, 0.5% miss per spelllevel lower than moblevel | |
hitrate = 0.85 + (spellLevel - targetlevel)/200); | |
else // Player < Mob, guessed formula | |
hitrate = 0.85 - Math.Sqrt(targetlevel - spellLevel) * 9; |
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
==24862== 18,393,915 bytes in 284 blocks are possibly lost in loss record 934 of 937 | |
==24862== at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) | |
==24862== by 0xD543E1: node::StreamWrap::OnReadImpl(long, uv_buf_t const*, uv_handle_type, void*) (in /root/t/iojs) | |
==24862== by 0xD551A2: node::StreamWrap::OnRead(uv_stream_s*, long, uv_buf_t const*) (in /root/t/iojs) | |
==24862== by 0xDA24DE: uv__read (stream.c:1168) | |
==24862== by 0xDA2AE7: uv__stream_io (stream.c:1231) | |
==24862== by 0xDA8114: uv__io_poll (linux-core.c:345) | |
==24862== by 0xD99835: uv_run (core.c:328) | |
==24862== by 0xD26017: node::Start(int, char**) (in /root/t/iojs) | |
==24862== by 0x5CA2EC4: (below main) (libc-start.c:287) |
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 http = require('http'); | |
var streamifier = require('streamifier'); | |
var Busboy = require('busboy'); | |
var FormData = require('form-data'); | |
var PORT = 6666; | |
var data = new Buffer(100 * 1024 * 1024); | |
http.createServer(function(req, res) { | |
var busboy = new Busboy({headers: req.headers}); | |
busboy.on('file', function() { |
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 http = require('http'); | |
var fs = require('fs'); | |
var Busboy = require('busboy'); | |
var PORT = 6666; | |
http.createServer(function(req, res) { | |
if (req.url === '/') { | |
res.writeHead(200, {'content-type': 'text/html'}); | |
res.end('<form action="/upload" enctype="multipart/form-data" method="post">'+ | |
'<input type="file" name="upload" multiple="multiple" onchange="this.parentNode.submit()">'+ |