Skip to content

Instantly share code, notes, and snippets.

View mattcassinelli's full-sized avatar

Matthew Cassinelli mattcassinelli

View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
######### count up twitter, FB, Pinterest shares + comments on your/project's site, put them in beautiful spreadsheet
######### screenshot: https://twitter.com/bluechoochoo/status/431853397612834816/photo/1
######### you just have to change ONE line of code, baby.
######### i'm not author, just adding newbie instructions. forked from https://gist.github.com/mediaczar/7808764
######### ******************* how-to: *******************
######### 1. replace URL in line 57 with YOUR sitemap (probably http://yourdomain.com/sitemap.xml)
######### 2. paste this entire code-snippet in your scraperwiki.com session (you've already signed-up, right?)

Bookmarklet to Post to Slack


Please note that this has a little problem: It posts the links as Slack Bot and not as yourself. You could add your name to the message but doesn't look right.


I've created a little bookmarklet that posts the url of the current webpage to a Slack channel. You have to set your token and the channel name manually but it's all fun and profit from there.

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep -B6 bindings:.*:
@andymatuschak
andymatuschak / MultiDirectionAdjudicatingScrollView.swift
Created January 26, 2015 19:31
Source for the Khan Academy app's unusual scrolling interactions
//
// MultiDirectionAdjudicatingScrollView.swift
// Khan Academy
//
// Created by Andy Matuschak on 12/16/14.
// Copyright (c) 2014 Khan Academy. All rights reserved.
//
import UIKit
import UIKit.UIGestureRecognizerSubclass
@tjluoma
tjluoma / sync.com.tjluoma.cleandesktop.plist
Created February 2, 2015 14:05
Be sure to change /Users/luomat/ to whatever your $HOME directory is. AppleScript from http://apple.stackexchange.com/a/71755/9226
<?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>Label</key>
<string>sync.com.tjluoma.cleandesktop</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/osascript</string>
<string>-e</string>
@gruber
gruber / Paste URL From Safari Tab.scpt
Created June 29, 2015 00:01
Paste URL From Safari Tabs
set _old_delims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {""}
tell application "System Events"
set _current_app to name of the first process whose frontmost is true
end tell
tell application "Safari"
set _urls to {}
repeat with i from 1 to 6 -- how many Safari windows to show URLs from
@rowanv
rowanv / blog_sparkline.js
Last active December 31, 2016 20:56
Gist to accompany my "How to make Tufte's discrete sparklines using d3.js" at http://dataviztalk.blogspot.com
var boston_record = [
['home', 'win'],
...
['away', 'loss'],
];
d3.select('#second-wrapper-main')
.selectAll('div')
.data(boston_record)
.enter().append('div')