Skip to content

Instantly share code, notes, and snippets.

View roycehaynes's full-sized avatar

Royce Haynes roycehaynes

View GitHub Profile
curl -XGET 'http://localhost:9200/lawyer/profile/_mapping?pretty=true'
{
"profile" : {
"properties" : {
"summary" : {
"type" : "string"
},
"headline" : {
"type" : "string"
},
curl -XGET 'http://localhost:9200/lawyer/profile/_mapping?pretty=true'
{
"profile" : {
"properties" : {
"profile" : {
"properties" : {
"summary" : {
"type" : "string"
},
"headline" : {
{ u'_shards': { u'failed': 0, u'successful': 5, u'total': 5},
u'facets': { u'payment_rate': { u'_type': u'terms',
u'missing': 2,
u'other': 0,
u'terms': [ { u'count': 3,
u'term': u'350'}],
u'total': 3},
u'practice_location': { u'_type': u'terms',
u'missing': 2,
u'other': 0,
@roycehaynes
roycehaynes / Server.php
Created February 26, 2013 20:34
Magento 623 error code issue
/**
* Handle an xmlrpc call (actual work)
*
* @param Zend_XmlRpc_Request $request
* @return Zend_XmlRpc_Response
* @throws Zend_XmlRpcServer_Exception|Exception
* Zend_XmlRpcServer_Exceptions are thrown for internal errors; otherwise,
* any other exception may be thrown by the callback
*/
protected function _handle(Zend_XmlRpc_Request $request)
@roycehaynes
roycehaynes / snowshow_pricing.html
Created May 15, 2013 17:41
Here's an example...
<html>
<head>
<title></title>
<script type="text/javascript">
function calculatePrice(){
var form = document.forms['computePrice'];
var numOfUnits = form.elements['numOfUnits'].value;
var leadTime = form.elements['leadTime'].value;
#RewriteEngine On
# This will enable the Rewrite capabilities
#RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
# This rule will redirect users from their original location, to the same location but using HTTPS.
# i.e. http://www.example.com/foo/ to https://www.example.com/foo/
# The leading slash is made optional so that this will work either in httpd.conf
FROM ubuntu:12.04
RUN mkdir -p /home/vagrant/www
{
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
"font_size": 16,
"hot_exit": false,
"remember_open_files": false,
"translate_tabs_to_spaces": true
}
var AppConstants = require('../constants/AppConstants.js');
var AppDispatcher = require('../dispatchers/AppDispatcher.js');
var api = require('../utils/api');
var ActionTypes = AppConstants.ActionTypes;
module.exports = {
create_customer: function(data){
api.customer.create(data);
}
{
"name": "the-app",
"version": "0.1.0",
"description": "description",
"main": "gulpfile.js",
"author": "Royce Haynes",
"dependencies": {
"es6-promise": "^1.0.0",
"validator": "~3.17.1",