CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 01:16:41 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"0675b184fd9334829cdbbef03ac6210e"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=s%2FkNFtLSXOY2SXImta8e3uyrTr%2F0gRlVu%2FXiyJ92L6iOEYXC2d%2ButhcdOj1PX2SBK4slA0ACnSqTaZxVqMoV5pbDJcEnWumDCC1uXydHsLR90iZNfNmW7QB7JkszrwWc4%2FdOR2qZnx7WanwmF8ne18hT57m1jPfYcv0WUvA%2Fl2eOuw%2BkByLmq9CyIxUbEIBBho1jTAsed4qSFqE9l2XOBL%2Fl34OPhoquTGpmb84XwZSm8SVoreuxTxcXUi5AWKrM8Cf%2BmdyjGIJ34zsAsKV0lQ%3D%3D--%2BMI1wqBrwzhSxuoZ--XnMxYgRLsJGa%2FhfSylpPXw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1761438569.1753233400; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 01:16:40 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 01:16:40 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 969C:2DEF93:22BF92:30B33E:688037F8
egaumer’s gists · GitHub
{{ message }}
Instantly share code, notes, and snippets.
egaumer
/ directives.js
Created
July 3, 2013 13:48
Angular directives for autocomplete and range slider.
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 strict"; | |
angular.module('fs.directives', []) | |
.directive('rangeSlider', function() { | |
return { | |
restrict: 'A', | |
link: function(scope, element, attrs) { | |
var min = parseInt(attrs.min, 10) || 0; | |
var max = parseInt(attrs.max, 10) || 100; |
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
$scope.pager = { | |
pageChange: function(pageNum) { | |
$scope.search(resultPager.get(pageNum)); | |
}, | |
next: function() { | |
this.pageChange(resultPager.next()); | |
}, |
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
/*jshint globalstrict:true */ | |
/*global angular:true */ | |
'use strict'; | |
angular.module('demo', [ | |
'demo.controllers', | |
'demo.directives', | |
'elasticjs.service' | |
]); |
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
# simple match all query with term facet | |
ejs.Request() | |
.indices("myindex") | |
.types("mytype") | |
.query(ejs.MatchAllQuery()) | |
.facet( | |
ejs.TermsFacet('url') | |
.field('url') | |
.size(20)) |
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 controller */ | |
function blog() { | |
function toAtom(results) { | |
default xml namespace = "https://www.w3.org/2005/Atom"; | |
var feed = <feed/>; | |
feed.id = "https://host.com/feeds/blog/atom"; | |
feed.title = "Sample Atom Feed"; | |
feed.author.name = "Jon Smith"; | |
feed.author.email = "jsmith@host.com"; |
egaumer
/ session.js
Last active
October 1, 2015 19:38
Basic session handling with evo server-side javascript controllers
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 controller */ | |
function session() { | |
function doGet(session) { | |
return { body: ["This method is public"] }; | |
} | |
function doPut(session) { | |
if (!session) { | |
/* user not logged in - send redirect */ |
egaumer
/ index.html
Created
March 2, 2012 22:49
Example of storing and retrieving a document by its id with the Cloud9 Javascript API
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> | |
<head> | |
<title>Simple Search</title> | |
<!-- Example search template using underscore.js --> | |
<script type="text/template" id="results"> | |
<li><%= title %></li> | |
</script> | |
</head> |
egaumer
/ index.html
Created
February 26, 2012 17:23
Example Span queries using Cloud9 Javascript API
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> | |
<head> | |
<title>Simple Search</title> | |
<!-- Example search template using underscore.js --> | |
<script type="text/template" id="results"> | |
<% _.each(hits.hits, function(hit) { %> | |
<li><%= hit._source.text %></li> | |
<% }); %> | |
</script> |
egaumer
/ index.html
Created
February 25, 2012 01:59
Example of dateHistogramFacet using Cloud9 Javascript API
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> | |
<head> | |
<title>Simple Search</title> | |
<!-- Example search template using underscore.js --> | |
<script type="text/template" id="results"> | |
<% _.each(hits.hits, function(hit) { %> | |
<li><%= hit._source.title %> published on <%= hit._source.date %></li> | |
<% }); %> |
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
#!/bin/bash | |
# run this before feeding example documents | |
# create the collection | |
curl -XPUT -H 'Content-Type:application/json' 'https://localhost:2600/v1/restaurant' | |
# explicitly define the location field to be of type 'geo_point' | |
curl -XPUT -H 'Content-Type:application/json' 'https://localhost:2600/v1/restaurant/locations/_mapping' -d '{ | |
"locations" : { |
NewerOlder
You can’t perform that action at this time.