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/ruby | |
| require 'rubygems' | |
| require 'xmpp4r' | |
| require 'xmpp4r/pubsub' | |
| require 'xmpp4r/pubsub/helper/nodebrowser.rb' | |
| require 'pp' | |
| HOST = 'push.bbc.co.uk' |
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
| # Use Fink (if available) | |
| test -r /sw/bin/init.sh && . /sw/bin/init.sh | |
| # In Mac OS X, what network location is set? | |
| if [ -f "/usr/sbin/scselect" ]; then | |
| export LOCATION=$(/usr/sbin/scselect 2>&1 | perl -ne 'if (m/^\s+\*\s+(\S+)\s+\((.+)\)$/) { print "$2\n"; }') | |
| echo "Network Location: $LOCATION" | |
| fi |
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
| COPY (SELECT artist.gid, artist_name.name, url.url FROM url | |
| JOIN l_artist_url ON (url.id = l_artist_url.entity1) | |
| JOIN artist ON (artist.id = l_artist_url.entity0) | |
| JOIN artist_name ON (artist_name.id = artist.name) | |
| WHERE url LIKE '%twitter.com%') TO STDOUT WITH CSV; | |
| 891abb2e-0156-411b-bf60-f4104e71ddfa,SMiLE.dk,http://twitter.com/smiledkmusic | |
| aead4c74-d7e1-4960-8cec-bacb86617924,Triobelisk,http://twitter.com/triobelisk | |
| 89bf7e7f-34ef-4d91-a4f2-4f2bfe8c5c67,Freeze The Atlantic,http://twitter.com/fta_band |
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 ruby | |
| require 'rubygems' | |
| require 'solareventcalculator' | |
| solar = SolarEventCalculator.new(Date.today, BigDecimal.new('51.563'), BigDecimal.new('-0.499')) | |
| puts "Sunrise: #{solar.compute_utc_civil_sunrise.getlocal}" | |
| puts "Sunset: #{solar.compute_utc_civil_sunset.getlocal}" |
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
| @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
| @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
| @prefix sd: <http://www.w3.org/ns/sparql-service-description#> . | |
| @prefix format: <http://www.w3.org/ns/formats/> . | |
| @prefix void: <http://rdfs.org/ns/void#> . | |
| format:N-Triples | |
| a format:Format ; | |
| rdfs:comment "N-Triples" ; |
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
| $ curl -v -T test.nt -H "Content-Type: text/plain" http://localhost:9000/data/test.rdf | |
| * About to connect() to localhost port 9000 (#0) | |
| * Trying 128.0.0.1... connected | |
| * Connected to localhost (127.0.0.1) port 9000 (#0) | |
| > PUT /data/test.rdf HTTP/1.1 | |
| > User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3 | |
| > Host: localhost:9000 | |
| > Accept: */* | |
| > Content-Type: text/plain | |
| > Content-Length: 197 |
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 | |
| /** | |
| * Store and retrieve data from a SPARQL 1.1 Graph Store | |
| * | |
| * This example adds a triple containing the current time into | |
| * a local graph store. It then fetches the whole graph out | |
| * and displays the contents. | |
| * | |
| * Note that you will a graph store, for example RedStore, | |
| * running on your local machine in order to test this example. |
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
| #define NANODE_LED_PIN 6 | |
| void setup() { | |
| pinMode(NANODE_LED_PIN, OUTPUT); | |
| Serial.begin(9600); | |
| Serial.println("Hello World!"); | |
| } |
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
| +--------------------------------------+----------------------------------------+ | |
| | gid | bbc_name | | |
| +--------------------------------------+----------------------------------------+ | |
| | 9c22e6c5-56a0-4559-b017-5b4e305141a2 | Abdel Halim Hafez | | |
| | fcff7228-c196-4fa8-84b5-b6252389be27 | Abram Levental | | |
| | b215b03a-8e0b-48ca-b832-bbbd0db504f0 | Akiko Yano | | |
| | b1f170dd-cd12-4148-90f2-1e58aa5400f1 | Aleksandr Grechaninov | | |
| | 5390b083-ab88-4a2e-838e-ea5e76f923ea | Alexander Alexandrovich Alyabiev | | |
| | fb04a1ef-e32c-410e-8fc5-bd81d6b057ce | Alexander Arkhangelsky | | |
| | 560b5e65-8d53-41b4-9913-83368f4721a0 | Alexander Borodin | |
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
| +-----------------------------------------+--------------------------------------+ | |
| | bbc_url | release_gid | | |
| +-----------------------------------------+--------------------------------------+ | |
| | http://www.bbc.co.uk/music/reviews/q9xm | 1e0e0bc1-6da4-46f7-9e71-a593c755fca6 | | |
| | http://www.bbc.co.uk/music/reviews/jf9x | b3dc682f-c7b1-4987-8f19-42db8c846675 | | |
| | http://www.bbc.co.uk/music/reviews/2n8c | 16c1c861-2cc0-4b3c-840b-07010993831a | | |
| | http://www.bbc.co.uk/music/reviews/963n | 67520d07-4fd8-467e-bbf9-7cceeb1b1a4c | | |
| | http://www.bbc.co.uk/music/reviews/vzf9 | bcac578a-8845-4937-826c-753a21cabcdd | | |
| | http://www.bbc.co.uk/music/reviews/w3n8 | de695059-168a-45f9-8265-af2f2e0a1143 | |