View README.md

Wat

I started seeing a ton of referrer traffic from monetizationking.net. If you fill out the form, it redirects you to adzos.com.

I'm real sick of referrer spam, so let's give them a taste.

In this example, I got Adzos' GA URL:

Adzos

View config.js
{
options: {
data: {
axes: {
"data1": 'y',
"data2": 'y2'
},
},
axis: {
y2: {
View buffer_schedule.rb
require 'optparse'
require 'csv'
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: buffer_schedule.rb [file.csv] [options]"
opts.on("-tTYPE", "--type=TYPE", "Type: twitter, facebook, linkedin") do |type|
options[:type] = type
end
View signed_url.rb
# This is a working example.
require 'json'
require 'openssl'
require 'base64'
require 'cgi'
ENCRYPT_KEY = "dek-d7a46236eda961a6c3c18ffcc6b077ba87d27e9ae85f7842c6d427c265dd5f69d5131308d93332353d4a55a4b1160fcf516515a4a9f0aa50fbf2d7a2e7d0f1c5"
PROJECT_TOKEN = "dt-RwYN"
def charturl_url(template_slug, options)
View push_to_knowtify.rb
# Part 1 at https://gist.github.com/ryana/7e64954d8dd15c858f30
def push_data_to_knowtify
api_token = "SEKRIT"
headers = {'Authorization' => "Token token=#{api_token}", 'Content-Type' => "application/json"}
url_base = "http://www.knowtify.io/api/v1"
endpoint = "/contacts/upsert"
data = {
contacts: [
{
View generate_url.rb
# Must install the `typhoeus` gem for this example.
require 'typhoeus'
# These dependencies work for Ruby 2.1.2. Earlier versions of
# Ruby may need different requires or gems
require 'json'
require 'openssl'
require 'base64'
require 'cgi'
View errors.js
// Ask Ramen 500 question on AJAX error
$(document).ajaxComplete(function(e, xhr, opts) {
// You may want to also catch 401, 403, 406, 422, etc....
// Talk with your developers to figure out which status codes
// need to be monitored.
if (xhr.status > 499 && xhr.status < 510) {
if (Ramen) {
Ramen.event("560ad1f87765626520281000");
}
}
View detect IE and version number through injected conditional comments.js
//EnhanceJS isIE test idea
//detect IE and version number through injected conditional comments (no UA detect, no need for cond. compilation / jscript check)
//version arg is for IE version (optional)
//comparison arg supports 'lte', 'gte', etc (optional)
function isIE(version, comparison) {
var cc = 'IE',
b = document.createElement('B'),
View sha.rb
h = {}
1_000_000.times do |i|
puts i if (i % 1_000 == 0)
str = (0...16).map { (65 + rand(26)).chr }.join
digest = (Digest::SHA256.new << str).to_s
num = digest.to_i(16) % 100
h[num] ||= 0
h[num] += 1
end
View sh200.headers.txt
Remote Address:199.27.79.184:80
Request URL:http://s7.addthis.com/static/r07/sh200.html
Request Method:GET
Status Code:304 Not Modified
Request Headers
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-GB,en;q=0.8,en-US;q=0.6
Cache-Control:max-age=0