(number is px on longest side, or exact dimensions)
A sampling from my personal account.
- 2048
- 720
| <h1><%= record.name %></h1> | |
| <!-- etc --> |
| multipass = MultiPass.encode( | |
| 'jux', | |
| api_key, | |
| :customer_name => current_user.displayname, | |
| :customer_email => current_user.email, | |
| :customer_custom_username => current_user.username, | |
| :uid => current_user.id, | |
| :expires => (Time.now + 120), # Expire two minutes from now | |
| :url_safe => true # Convert unsafe characters | |
| ) |
| deepMerge: function(dest){ | |
| _.each(_.rest(arguments), function(source){ | |
| var sourceVal, destVal; | |
| for (var prop in source){ | |
| sourceVal = source[prop]; | |
| destVal = dest[prop]; | |
| if (prop in dest && _.isObject(sourceVal) && _.isObject(destVal)){ | |
| _.deepMerge(destVal, sourceVal); | |
| } else { | |
| dest[prop] = sourceVal; |
| git log --branches=* --author=Aidan ^origin/deployed |
| function foo(){ | |
| return 'foo' | |
| } |
| db.users.find({'custom_links.1': {$exists: true}}).snapshot().forEach(function(user){ | |
| var urls = {}, | |
| keepLinks = []; | |
| user.custom_links.forEach(function(link){ | |
| var url = link.value.toString().toLowerCase().replace(/\/$/, '').replace(/^(https?:?\/\/)?(www\. ?)?/, ''); | |
| if (!urls[url]){ | |
| keepLinks.push(link); | |
| urls[url] = true; | |
| } |
| # ... | |
| group :development, :test do | |
| gem 'sqlite3' | |
| end | |
| group :production do | |
| gem 'pg' | |
| end |
| user = User.find_by_username('catturner') | |
| user_id = user.id | |
| next_max_id = nil | |
| quark_ids = [] | |
| picture_ids = [] | |
| begin | |
| # instagram limits to 60 | |
| query = {access_token: user.instagram_token.token, count: 60} | |
| query[:max_id] = next_max_id if next_max_id | |
| results = HTTParty.get 'https://api.instagram.com/v1/users/self/media/recent', format: :json, query: query |
| # using Mongoid | |
| # clean up leading/trailing whitespace | |
| User.where(twitter_username: /(\A\s+[A-Za-z0-9_]+\s*\z)|(\A\s*[A-Za-z0-9_]+\s+\z)/).each do |user| | |
| user.twitter_username = user.twitter_username.strip | |
| user.save! | |
| end | |
| # clean up twitter usernames of the format @... or twitter.com/... | |
| link_rx = /(?:\A@|\A\/|twitter\.com\/(?:#!\/)?)([A-Za-z0-9_]+)\s*\z/i |