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
local count = 0 | |
core.register_service("auth", "http", function (applet) | |
count = count + 1 | |
-- Get X-Auth-Token -- | |
local token = applet.headers['x-auth-token'][0] | |
local cmd = 'curl -H "X-Auth-Token:'..token..'"' | |
cmd = cmd..' -sL -w "%{http_code}\\n"' | |
cmd = cmd..' "https://staging.identity-internal.api.rackspacecloud.com/v2.0/tokens/'..token..'"' | |
cmd = cmd..' -o /dev/null' |
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
@app.route("/home") | |
or | |
@app.route("/home/") |
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
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return "Hello World!" | |
if __name__ == "__main__": | |
app.run() |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
</head> | |
<body> | |
</body> | |
</html> |
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
<html> | |
<head> | |
<style> | |
body{ | |
background-color: #eee; | |
} | |
.triForce { | |
height: 50px; |
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
/* gets any input that is type submit */ | |
input[type='submit']{} | |
/* gets the first child of an element */ | |
table:first-child{} | |
/* gets the second element that comes after the first, | |
in this example any hr tags that follow a div tag */ | |
div + hr{} |
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
.desktopIcon | |
{ | |
background-position: 0 0; | |
height: 25px; | |
width: 25px; | |
background-repeat: no-repeat; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<script src="jquery-1.7.2.min.js" ></script> | |
<script src="handlebars-1.0.0.beta.6.js" ></script> | |
<script src="underscore-min.js" ></script> | |
<script src="backbone-min.js" ></script> | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" | |
content="text/html; charset=utf-8" /> | |
<script src="jquery-1.7.2.min.js" ></script> | |
<script src="handlebars-1.0.0.beta.6.js" ></script> | |
<script src="underscore-min.js" ></script> | |
<script src="backbone-min.js" ></script> |
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
require 'sinatra' | |
require 'json' | |
get '/api/hello' do | |
# Return this message in JSON format. | |
content_type :json | |
{ :message => 'Hello World!' }.to_json | |
end |
NewerOlder