Skip to content

Instantly share code, notes, and snippets.

@robinsloan
robinsloan / langoliers.rb
Last active June 25, 2024 17:12
The Langoliers, a tweet deletion script
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = "your_username"
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted
# get these from dev.twitter.com
CONSUMER_KEY = "your_consumer_key"
@pjrvs
pjrvs / newslettercookie.html
Last active November 7, 2017 09:33
a jquery cookie that shows a signup form for people that aren't signed up and an alternate message for people that came from the list or signed up.
<!DOCTYPE html>
<html>
<head>
<title>jQuery Cookie + MailChimp</title>
<meta charset="utf-8">
</head>
<body>
<form action="XXX" method="post" class="signup">
@robinsloan
robinsloan / unfave.rb
Last active June 5, 2022 21:32
Unfave script, because why not??
#!/usr/bin/env ruby
require "rubygems"
require "twitter"
require "json"
require "faraday"
# things you must configure
TWITTER_USER = "your_username"
# get these from dev.twitter.com
@andrewconnell
andrewconnell / drip-blogpost-autotagger.html
Created February 24, 2017 13:31
Drip script snippet used to auto tag visitors
<!-- drip auto-tagger -->
<!--
this script does four things:
1) finds all tags for a blog post & converts to tags in the format: interest-[pascalCasePostTag]
2) converts blog post title to drip tag in the format: read-[pascalCaseBlogPostTitle]
3) sends the tags to drip for the current user
4) registers "Read blog post" drip event on current user
-->
<p>
<script type="text/javascript">