This file contains 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
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHeader(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World'); | |
}).listen(8000); | |
console.log('Server running at http://127.0.0.1:8000/'); |
This file contains 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
package main | |
import ( | |
"http" | |
"fmt" | |
) | |
func HelloServer(w http.ResponseWriter, r *http.Request) { | |
fmt.Fprintln(w, "hello, world!\n"); | |
} | |
func main() { | |
http.HandleFunc("/", HelloServer); |
This file contains 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
#!/bin/sh | |
# wget this script and run "sudo sh bamboo_agent.sh" | |
# Enable the multiverse repos | |
sed -i "/^# deb.*multiverse/ s/^# //" /etc/apt/sources.list | |
apt-get update | |
# Install the deps |
This file contains 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
#!/bin/sh | |
# Git | |
sudo apt-get -y install git | |
# node.js | |
NODE_VERSION=0.10.18 | |
curl http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz | tar xzv | |
ln -s node-v$NODE_VERSION-linux-x64 node-0.10 |
This file contains 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
import 'dart:async'; | |
import 'dart:convert' show JSON; | |
import 'dart:io'; | |
import 'http://github.com/lord-otori/ascii_tables/raw/master/lib/ascii_tables.dart'; | |
main() { | |
new HttpClient() | |
.getUrl(Uri.parse("https://api.github.com/search/repositories?q=language:dart&sort=stars&order=desc")) | |
.then((req) { | |
req.headers.add(HttpHeaders.USER_AGENT, "dart"); |
This file contains 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
import 'package:http/http.dart' as http; | |
import 'dart:async'; | |
import 'dart:convert'; | |
import 'dart:io'; | |
Future<Iterable> getGistsForUser(String user) => http.get("https://api.github.com/users/$user/gists") | |
.then((res) => JSON.decode(res.body).map((e) => e["html_url"])); | |
prompt(txt) { stdout.write(txt); return stdin.readLineSync(); } |
This file contains 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
<link rel="import" href="../polymer/polymer.html"> | |
<link rel="import" href="../font-roboto/roboto.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../nuxeo-elements/nx-connection.html"> | |
<link rel="import" href="../nuxeo-elements/nx-content-view.html"> | |
<link rel="import" href="../nuxeo-elements/nx-page-provider.html"> | |
<nx-connection id="nx_connection" url="http://demo.nuxeo.com/nuxeo"></nx-connection> |
This file contains 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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
This file contains 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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
OlderNewer