Skip to content

Instantly share code, notes, and snippets.

View adamloving's full-sized avatar
💭
10x Ninja Rockstar

Adam Loving adamloving

💭
10x Ninja Rockstar
View GitHub Profile
@adamloving
adamloving / wordpress-thesis-flickr-badge.php
Created February 26, 2012 22:09
Add a flickr badge to the wordpress thesis feature box
function flickr_badge() {
?>
<!-- Start of Flickr Badge -->
<style type="text/css">
#flickr_badge_source_txt {padding:0; font: 11px Arial, Helvetica, Sans serif; color:#666666;}
#flickr_badge_icon {display:block !important; margin:0 !important; border: 1px solid rgb(0, 0, 0) !important;}
#flickr_icon_td {padding:0 5px 0 0 !important;}
.flickr_badge_image {text-align:center !important;}
.flickr_badge_image img {border: 1px solid black !important;}
#flickr_www {display:block; padding:0 10px 0 10px !important; font: 11px Arial, Helvetica, Sans serif !important; color:#3993ff !important;}
@adamloving
adamloving / mailchimp-subscribe.html
Created February 26, 2012 23:42
Mailchimp embeddable subscribtion form
<!-- Begin MailChimp Signup Form -->
<style>
#mc-text {
clear: both;
font-style: italic;
color: #666;
}
#mc-email {
font-size: 1.2em;
@adamloving
adamloving / csv_file.rb
Created April 6, 2012 20:29
Import google contacts unicode csv file (after recognizing UTF-16LE)
require 'iconv'
require 'csv'
class CsvFile
# require 'csv_file'; CsvFile.test
def self.test
puts "--- GOOGLE ---"
f = File.open('test/fixtures/google-contacts.csv')
contacts = CsvFile.new(f).parse_contacts
@adamloving
adamloving / tabs.sass
Created April 13, 2012 23:23
Style Twitter bootstrap tabs with CSS directional arrows.
.nav-tabs
&.directional
border: 1px solid #ddd
border-radius: 2px
overflow: hidden
li
margin-bottom: 0px
width: 100px
text-align: center
@adamloving
adamloving / viral_gate_code.html
Created May 18, 2012 16:50
Viral Gate: require tweeting, liking, or sharing to reveal content.
<!-- *** ADD THIS CODE AFTER YOUR PUBLIC CONTENT *** -->
<p class="adl-outside-gate">
Enjoying this so far? Please click one of the buttons below to read the rest.
</p>
<div class="adl-inside-gate">
<!-- *** REPLACE THIS LINE WITH PRIVATE CONTENT *** -->
Nice, you found it!
@adamloving
adamloving / tweet-this.js
Created November 25, 2012 00:48
Add "tweet this" links to text in a blog post
function onMouseenter(e) {
el = $(e.target);
url = 'https://twitter.com/intent/tweet?text='
url += encodeURIComponent(el.text());
url += ' ' + window.location.href;
// el.css('position', 'relative');
el.append('<a href="' + url + '" target="_blank" class="tweet-this" style="position: relative; left: 5px;">Tweet this</a>');
};
function onMouseleave(e) {
@adamloving
adamloving / adamloving.js
Created December 10, 2012 18:01
Full contact results for my email
{
"status": 200,
"likelihood": 0.9,
"request_id": "c1fcbf16-44a6-474f-a307-2677651892d8",
"photos": [{
"url": "https://graph.facebook.com/620375350/picture?type=large",
"type": "facebook",
"type_id": "facebook",
"type_name": "Facebook",
"is_primary": true
@adamloving
adamloving / validate_twitter_usernames.rb
Created December 11, 2012 22:49
Validate a file full of Twitter usernames to filter out banned or deleted user accounts. Output follower count and Twitter ID in a CSV. Handle rate limiting.
#!/usr/bin/env ruby
require 'twitter'
Twitter.configure do |config|
config.consumer_key = ENV['TWITTER_CONSUMER_KEY']
config.consumer_secret = ENV['TWITTER_CONSUMER_SECRET']
config.oauth_token = ENV['TWITTER_OAUTH_TOKEN']
config.oauth_token_secret = ENV['TWITTER_OAUTH_TOKEN_SECRET']
end
ar = $('.memName');
for (i in ar) { a = ar[i]; console.log(a.innerText, a.href) }
@adamloving
adamloving / temporary-email-address-domains
Last active November 1, 2025 10:02
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com