cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git://github.com/jashkenas/coffee-script-tmbundle CoffeeScript
git clone https://github.com/miksago/jade-tmbundle.git Jade
git clone https://github.com/LearnBoost/stylus.git Stylus
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
| module(euler10). | |
| -compile(export_all). | |
| start() -> | |
| sieve(lists:seq(2, 2000000)). | |
| sieve(List) -> | |
| sieve(List, 0). | |
| sieve([], Acc) -> | |
| Acc; | |
| sieve([H|T], Acc) -> |
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
| (def urls (array "http://a.tile.openstreetmap.org/${z}/${x}/${y}.png" | |
| "http://b.tile.openstreetmap.org/${z}/${x}/${y}.png" | |
| "http://c.tile.openstreetmap.org/${z}/${x}/${y}.png")) | |
| (def OSM (js/OpenLayers.Layer.XYZ. "OSM (with buffer)" urls (extend-object! (js-obj) {"transitionEffect" "resize" | |
| "buffer" 2 | |
| "wrapDateLine" true | |
| "sphericalMercator" true}))) | |
| (def plot (js/OpenLayers.Map. (extend-object! (js-obj) {"div" "plot" |
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 | |
| /** | |
| * This template is used to print a single field in a view. It is not | |
| * actually used in default Views, as this is registered as a theme | |
| * function which has better performance. For single overrides, the | |
| * template is perfectly okay. | |
| * | |
| * Variables available: | |
| * - $view: The view object | |
| * - $field: The field handler object that can process the input |
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 | |
| $url = url('http://maps.googleapis.com/maps/api/geocode/json', array('query' => array('address' => 'Екатеринбург, Чайковского 86/3', 'sensor' => 'false'))); | |
| $contents = file_get_contents($url); | |
| $response = drupal_json_decode($contents); | |
| if ($response['status'] == 'OK') { | |
| drupal_add_js('https://maps.google.com/maps?file=api&v=2&key=AIzaSyD4iE2xVSpkLLOXoyqT-RuPwURN3ddScAI', 'external'); | |
| foreach ($response['results'] as $address) { | |
| $lat = $address['geometry']['location']['lat']; | |
| $lng = $address['geometry']['location']['lng']; |
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
| -module(sleepsort). | |
| -export([sort/1]). | |
| sort(List) -> | |
| sort(List, [], []). | |
| sort([], NewList, []) -> | |
| lists:reverse(NewList); | |
| sort(List, [], []) -> | |
| Pids = lists:map(fun(Element) -> spawn(sleepsort, sleep, [self(), Element]) end, List), |
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
| #include <fstream> | |
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| // File headers | |
| int version; | |
| int datarate; | |
| int samples_count; | |
| int mode; |
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 coffee | |
| ''' | |
| Yelp TERM in CITY and render results as geojson (or map). | |
| Examples: | |
| yelp tacos | |
| yelp --in Louisville brewpubs | |
| yelp --in Nashville "chinese takeout" | |
| yelp --map --in Milwaukee "bowling alleys" # render results as map via geojson.io |
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
| Map { | |
| buffer-size: 0; | |
| background-color: @water; | |
| } | |
| @land: #E9E2DF; | |
| @water: #6FB5E7; | |
| #slope { | |
| raster-opacity: 1; |
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 python | |
| ############################################################################### | |
| # $Id$ | |
| # | |
| # Purpose: Builds global VRT for GMTED2010 data. | |
| # Author: Even Rouault, <even dot rouault at mines dash paris dot org> | |
| # | |
| ############################################################################### | |
| # Copyright (c) 2011, Even Rouault, <even dot rouault at mines dash paris dot org> | |
| # |