Skip to content

Instantly share code, notes, and snippets.

Kyle J. Davis stockholmux

Block or report user

Report or block stockholmux

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
View gist:bf2342a24fd5a80f235f2b323b876fca
<?php
require_once 'vendor/autoload.php';
$client = new Predis\Client([
/* ... */
]);
$client->set('foo', 'bar');
$value = $client->get('foo');
@stockholmux
stockholmux / redirect.fetch.test.node.js
Created Jan 3, 2014
When using jsdom, redirects are followed but they do not take into account any cookies that are set during the course of the redirect. Consider the short express app and related jsdom script.
View redirect.fetch.test.node.js
var
jsdom = require('jsdom');
jsdom.env(
'http://localhost:3012/',
["http://code.jquery.com/jquery.js"],
function (errors, window) {
if (errors) {
console.log('error', errors);
} else {
@stockholmux
stockholmux / anchorIssue.html
Created Nov 5, 2013
Illustrate issue with onScreen jquery plugin (https://github.com/silvestreh/onScreen) and anchor links
View anchorIssue.html
<!DOCTYPE html>
<html>
<head>
<title>on screen test</title>
<style>
.box {
padding-top: 50px;
padding-bottom: 50px;
margin-bottom: 10px;
You can’t perform that action at this time.