This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const trackers = { | |
"365offers.trade": "trk.365offers.trade", | |
"Absolutesoftware-email.com": "click.absolutesoftware-email.com\\/open.aspx", | |
"ActiveCampaign.com": "lt.php(.*)\\?l=open", | |
"ActionKit.com": "track.sp.actionkit.com\\/q\\/", | |
"Acoustic.com": "mkt\\d{4,5}.com/open", | |
"Adobe.com": [ | |
"demdex.net", | |
"t.info.adobesystems.com", | |
"toutapp.com", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Entry::TrackerBlocking | |
extend ActiveSupport::Concern | |
included do | |
has_many :blocked_trackers | |
end | |
email_service_blockers = { | |
"ActiveCampaign" => /lt\.php(.*)?l\=open/, | |
"AWeber" => "openrate.aweber.com", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) Create your private key (any password will do, we remove it below) | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "mechanize" | |
agent = Mechanize.new | |
agent.user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) " + \ | |
"AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5" + \ | |
" Safari/536.30.1" | |
page = agent.get "https://rubytapas.dpdcart.com/subscriber/content" | |
login_form = page.form_with id:"login-form" | |
login_form.field_with(id:"username").value = tapas_username | |
login_form.field_with(id:"password").value = tapas_password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>comment</key> | |
<string> | |
TODO: unresolved issues | |
text: | |
"p << end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Author: Patrick Helm (deradon87@gmail.com), 2013 | |
# | |
# | |
# Simple git-snippet to commit a small fix with auto-generated commit-message. | |
# | |
# ## Description | |
# | |
# I noticed, we developers often needs to fix a small typo or do something |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inside my base include file which includes Compass. | |
%bs-border-box { @include box-sizing(border-box); } | |
// Inside my application Sass file. | |
@each $el in elements-of-type('block') { #{$el} { @extend %bs-border-box; } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Click open/close Dropdown in pure CSS */ | |
/* Disclaimer: Not the most semantic | |
thing in the universe. */ | |
/* Forked from original idea | |
http://jsfiddle.net/paullferguson/Sv54G/3/ */ | |
.tabs { | |
position: relative; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ActionView::Template | |
module Handlers | |
class Excel | |
def call(template) | |
%{ | |
Tempfile.open('writeexcel').tap do |tmp| | |
WriteExcel.new(tmp.path).tap do |workbook| | |
#{template.source} | |
end.close | |
end.tap(&:rewind).read |
NewerOlder