Skip to content

Instantly share code, notes, and snippets.

View maccman's full-sized avatar
🦜
gpu poor

Alex MacCaw maccman

🦜
gpu poor
View GitHub Profile
@maccman
maccman / technologies.md
Last active August 29, 2015 14:24
Clearbit Tech Detect

Clearbit Tech Detect

Clearbit indexes the following technologies:

Name Type
Google Widgets google_widgets
Twitter Badge twitter_badge
Google Analytics google_analytics
Omniture Adobe Analytics omniture_adobe_analytics
@maccman
maccman / changelog.md
Last active August 29, 2015 14:21
Clearbit API Changelog

Clearbit API versions

Your API version controls the API and webhook behavior you see (e.g. what properties you see in responses, what parameters you’re permitted to send in requests, etc.). Your version gets set the first time you make an API request. When we change any of our APIs in a backwards-incompatible way, we release a new dated version, but to avoid breaking your code, we don’t change your version until you're ready to upgrade.

How can I upgrade versions?

Each of Clearbit's APIs is versioned separately. You can set the API version on a per-request basis, or globally in your dashboard. It's a good idea to keep the API version you're using up to date - we're often pushing shiny new data attributes.

API changelog

module PersonHub
module Extensions
module Version extend self
CURRENT_API_VERSION = '2015-04-30'
def registered(app)
app.set(:version) do |value|
condition { request_api_version >= value }
end
Vagrant::configure('2') do |config|
config.vm.define :box1, autostart: false do |box|
box.vm.box = 'raring'
box.vm.box_url = 'https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box'
box.vm.hostname = 'example.com'
box.vm.provider :aws do |aws, override|
aws.access_key_id = ENV['AWS_ACCESS_KEY_ID']
aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
aws.keypair_name = 'aws'
@maccman
maccman / batch.rb
Created September 22, 2014 01:34
Batch Paginate in SQL
module Sequel
module Plugins
module Batch
module DatasetMethods
def batch_page(page_size = 2_000)
last_record = order(:iid.asc).first
last_iid = last_record && last_record.iid || 0
last_iid -= 1
loop do
class @Reloader
constructor: (@selector = '.wrapper', @path, @interval = 2000) ->
@start()
start: =>
@timer = setInterval(@fetch, @interval)
stop: =>
clearInterval(@timer)
@maccman
maccman / index.html
Created May 16, 2014 19:06
Rendering with an Event Loop
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script type="text/javascript" src="../lib/parrot.js"></script>
<script type="text/javascript" src="../lib/parrot.example.js"></script>
<script type="text/javascript">
var widget = new ParrotWidget
document.body.appendChild(widget.el);
SELECT repository_language, count(repository_language) AS repos_by_lang
FROM [githubarchive:github.timeline]
WHERE repository_fork == "false"
AND type == "CreateEvent"
AND PARSE_UTC_USEC(repository_created_at) >= PARSE_UTC_USEC('2013-01-01 00:00:00')
AND PARSE_UTC_USEC(repository_created_at) < PARSE_UTC_USEC('2013-12-30 00:00:00')
GROUP BY repository_language
ORDER BY repos_by_lang DESC
LIMIT 100;
@maccman
maccman / why_oh_why.md
Last active December 31, 2015 03:49
Worst recruiting email ever?

Hwody,

"Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoatnt tihng is taht the frist and lsat ltteers be at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe."

Wihch I thuoghtis was graet nwes as I’ve alwyas been ruisbbh at sepllnig!!

I hvae a nubmer of aewsmoe clinets form Lodnon’s tech satrt ups throguh to laeidng hsouehlod naems that are lokoing for both cotrnact and peramnent deveolpers gonig into 2014. I have icnluedd a breif description of jsut a few of the crurent opoprtunities I am recruiting for and wuold love to hree form you if you are availbale for new cotnarct projects or lokoing to mkae a move into a new premnaent psotiion.

· CTO / Lead developer (ruby on rails) / Financial client / Greenfield project / Permanent paying up to £90k.

$ = jQuery
$.activeTransforms = 0
$(document).ajaxSend (e, xhr, settings) ->
return unless settings.warn
$.activeTransforms += 1
$(document).ajaxComplete (e, xhr, settings) ->
return unless settings.warn