Skip to content

Instantly share code, notes, and snippets.


Alexander Quine alxndr

View GitHub Profile
alxndr /
Created Feb 28, 2019 — forked from shobotch/
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

alxndr / metatags.js
Last active Dec 6, 2019
Log out all the `<meta name="" content="">` tags on the current page in Chrome Dev Tools
View metatags.js
$$("meta[content]").reduce((obj, tag) => Object.assign(obj, {[ || tag.getAttribute("property")]: tag.content}), {})
alxndr / code.js
Last active Nov 6, 2016 — forked from maxkfranz/code.js
phish song co-occurrence graph
View code.js
const uniq = array => [ Set(array)];
const flatten = (arr) => arr.reduce((a, b) => a.concat(b), []);
const extractUniqueShowYears = showsData => {
return uniq( =>"-")[0]).sort());
const extractJSON = response => response.json();
const fetchJSON = url => fetch(url).then(extractJSON);
View How I saved a year of our family pictures from a dead hard drive.
Copied from (via
Ars Scholae Palatinae
et Subscriptor
Tribus: Where the women are strong, the men are good looking, and all the children are above average.
Registered: Nov 11, 2002
Posts: 924

Keybase proof

I hereby claim:

  • I am alxndr on github.
  • I am alxndr ( on keybase.
  • I have a public key whose fingerprint is DD42 73E5 4D56 995C 767B 5176 56A0 79B0 E81E 5F1B

To claim this, I am signing this object:

alxndr / sanity_test.exs
Created Sep 18, 2015
Sanity test for Elixir projects. Place directly in the `test/` directory.
View sanity_test.exs
defmodule App.SanityTest do
@directory_separator "/"
@test_dir __DIR__
@excluded_dirs ~w(factories support fixture vcr_cassettes custom_cassettes)
@excluded_files ~w(test_helper.exs)
test "checks that all test files are named properly" do
bad_files =
Path.join([@test_dir, "**", "*"])
|> Path.wildcard
alxndr / evaluator-patch.diff
Last active Aug 29, 2015
concept: working `|>`-prefix in iex
View evaluator-patch.diff
diff --git a/lib/iex/lib/iex/evaluator.ex b/lib/iex/lib/iex/evaluator.ex
index ac31d93..9922aba 100644
--- a/lib/iex/lib/iex/evaluator.ex
+++ b/lib/iex/lib/iex/evaluator.ex
@@ -89,6 +89,17 @@ defmodule IEx.Evaluator do
try do
do_eval(String.to_char_list(code), state, history)
+ kind, error = %{description: "syntax error before: '|>'"} ->
+ if can_repipe?(code, history) do
View chat_demo.ex
defmodule Chat.Client do
def join(server) do
client_send server, :join
def say(server, message) do
client_send server, { :say, message }
def leave(server) do
View Integration Testing Setup with RSpec and

Integration Testing Setup with RSpec and Capybara

by Paul Elliott, May 11, 2010, content retrieved using Internet Archive's Wayback Machine

Integration testing is critical for modern web applications. It provides a chance to exercise all the features of your site in a real or mock browser and make sure that everything still work correctly with any changes made. It plays a key role in insuring the quality of your application and that your users have as bug-free an environment as possible.

Integrating it into your existing rspec setup is a breeze, too. I am a big fan of Jonas Nicklas’ Capybara (, which is a great gem that lets you mix and match web drivers over a common interface and allows you to test specific functions of your site with the appropriate platform. You can easily use it directly with RSpec to write a comprehensive integration test suite for your application.

Let’s get started by running rake. If you don’t

View rails_rce.rb
#!/usr/bin/env ruby
# Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
# ## Advisory
# ## Caveats