This is a recreation (for the purpose of tinkering with an implementation in d3.js) of the example from the book SVG Essentials by J. David Eisenberg.
The <feColorMatrix> element allows to change color values in a following way.
| # Committing changes to a repo via the Github API is not entirely trivial. | |
| # The five-step process is outlined here: | |
| # http://developer.github.com/v3/git/ | |
| # | |
| # Matt Swanson wrote a blog post translating the above steps into actual API calls: | |
| # http://swanson.github.com/blog/2011/07/23/digging-around-the-github-api-take-2.html | |
| # | |
| # I was not able to find sample code for actually doing this in Ruby, | |
| # either via the HTTP API or any of the gems that wrap the API. | |
| # So in the hopes it will help others, here is a simple function to |
This is a recreation (for the purpose of tinkering with an implementation in d3.js) of the example from the book SVG Essentials by J. David Eisenberg.
The <feColorMatrix> element allows to change color values in a following way.
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| import glob, json | |
| # this script loves this script | |
| # https://gist.github.com/3350235 | |
| points = [] | |
| vids = set() | |
| places = glob.glob("checkins/*.json") | |
| for p in places: |
| 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" |
| #troparevo_nikulino_1 [layer='points']{ | |
| marker-fill:#FF3366; | |
| marker-width:8; | |
| marker-line-color:#000000; | |
| marker-line-width:1; | |
| marker-opacity:1; | |
| marker-line-opacity:1; | |
| marker-placement:point; | |
| marker-type:ellipse; | |
| marker-allow-overlap:true; |
| #!/usr/bin/env ruby | |
| cmds = [] | |
| cmds << "git co gh-pages" | |
| cmds << "git merge master" | |
| cmds << "git push github gh-pages" | |
| cmds << "git co master" | |
| system cmds.join("&&") |
| Dir.glob("*.psd").each do |file| | |
| system("sips -s format png #{file} --out #{File.basename(file,'.psd')}.png") | |
| end |
| Gemfile.lock |