Skip to content

Instantly share code, notes, and snippets.

Michael Koper michaelkoper

  • Nusii
  • Madrid
Block or report user

Report or block michaelkoper

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@michaelkoper
michaelkoper / apache_bench.sh
Last active Jun 2, 2016 — forked from seyhunak/apache_bench.sh
Rails - Apache Bench - Load Testing (if Warden Sign-in Required)
View apache_bench.sh
1.
LOGIN_PAGE=http://localhost.dev/users/sign_in
curl --cookie-jar cookie_file $LOGIN_PAGE | grep csrf-token
2.
<meta content="csrf-token" name="csrf-token" />
@michaelkoper
michaelkoper / backbone_pushstate_router.js
Last active Oct 5, 2016 — forked from tbranyen/backbone_pushstate_router.js
hijack links for pushState in Backbone. With open in new tab functionality.
View backbone_pushstate_router.js
// Use absolute URLs to navigate to anything not in your Router.
var openLinkInTab = false;
// Only need this for pushState enabled browsers
if (Backbone.history && Backbone.history._hasPushState) {
$(document).keydown(function(event) {
if (event.ctrlKey || event.keyCode === 91) {
openLinkInTab = true;
You can’t perform that action at this time.