A version of Mike Bostock’s animated world countries, which uses a more accurate spherical interpolation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use 5.016; | |
| use common::sense; | |
| use utf8::all; | |
| # Use fast binary libraries | |
| use EV; | |
| use Web::Scraper::LibXML; | |
| use YADA 0.039; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The fact that YAML.load will instantiate arbitrary ruby objects | |
| # means that calling `YAML.load` on untrusted data is virtually always | |
| # equivalent to executing arbitrary code in a complex app. | |
| # This code fragment globally neuters YAML to disable this behavior, | |
| # which should (hopefully) cut off all such attacks from the start. | |
| # I don't promise this closes all possible attacks, but this closes | |
| # off the trivial case. You should audit and upgrade all your | |
| # dependencies, as well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Datomic example code | |
| ;; demonstrates various update scenarios, using a news database | |
| ;; that contains stories, users, and upvotes | |
| ;; grab an in memory database | |
| (use '[datomic.api :only (q db) :as d]) | |
| (def uri "datomic:mem://foo") | |
| (d/create-database uri) | |
| (def conn (d/connect uri)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # = Pickr - A Gallery tool for Photographers | |
| # These classes represent are an abstration away from the Flickr API. | |
| # They provide methods for creating a gallery of photos for selecting | |
| # and submitting to the photographer. | |
| # | |
| require 'rubygems' | |
| require 'flickraw-cached' | |
| require 'yaml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once(dirname(__FILE__) . "/phpFlickr/phpFlickr.php"); | |
| require_once(dirname(__FILE__) . "/config.inc.php"); | |
| define("API_KEY", $config['flickr_api_key']); | |
| define("USER_ID", $config['user_id']); | |
| define("FLICKR_PHOTO_URL", "http://www.flickr.com/photos"); | |
| define("FLICKR_STATIC_URL", "http://farm5.static.flickr.com"); | |
| define("PRIMARY_PHOTO_CACHE", $config['primary_photo_cache']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # = Pickr - A Gallery tool for Photographers | |
| # These classes represent are an abstration away from the Flickr API. | |
| # They provide methods for creating a gallery of photos for selecting | |
| # and submitting to the photographer. | |
| # | |
| import yaml | |
| import json | |
| import flickrapi |
Tired of waiting for emacs to start on OS X? This step by step guide will
teach you how to install the latest version of emacs and configure it to start
in the background (daemon mode) and use emacsclient as your main editor.
Download the latest pretest version of [Emacs for Mac OS X]: http://emacsformacosx.com/builds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns demo.gemstoclojure | |
| (:use ring.adapter.jetty) | |
| (:use clojure.contrib.io) | |
| (:use clojure.contrib.classpath)) | |
| (import '(org.jruby.embed ScriptingContainer LocalContextScope)) | |
| (def c (ScriptingContainer. LocalContextScope/THREADSAFE)) | |
| (println (classpath)) | |
| (println (pwd)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @file fsm.c | |
| * @brief an implementation for a FSM in C, this file contains | |
| * implementation of definations. | |
| * License GPLv3+ | |
| * @author Ankur Shrivastava | |
| */ | |
| #include "fsm.h" | |
| #include<stdlib.h> |