Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
"_id": 1,
(function($){ | |
var map = { | |
pickup: 1, | |
driver: 2, | |
fare: 3, | |
car: 4, | |
city: 5, | |
payment_method: 6 | |
}; |
# Start a local webserver to serve the file of your current directory on the LAN: | |
# Python version 2.x: | |
python -m SimpleHTTPServer | |
# Python version 3.x: | |
python3 -m http.server | |
#Start a local SMTP server to debug your app emails. Emails will be printed on stdout: | |
python -m smtpd -c DebuggingServer -n | |
#Parse and prettify a JSON string with: |
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
/* eslint-env node */ | |
var path = require('path'); | |
var _ = require('lodash'); | |
var here = require('path-here'); | |
/** | |
* Current Environment | |
* @type {string} | |
*/ | |
process.env.NODE_ENV = process.env.NODE_ENV || 'test'; |
.word-wrap { | |
/* These are technically the same, but use both */ | |
overflow-wrap: break-word; | |
word-wrap: break-word; | |
-ms-word-break: break-all; | |
/* This is the dangerous one in WebKit, as it breaks things wherever */ | |
word-break: break-all; | |
/* Instead use this non-standard one: */ | |
word-break: break-word; |
Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
"_id": 1,
a=1; for i in *.jpg; do new=$(printf "%d.jpg" "$a"); mv -- "$i" "$new"; let a=a+1; done |
string.replace(/[\n\r]/ig, '!space!').replace(/!space!/ig, '') |
var alphabeticalSort = function(array) { | |
return array.sort(function(a, b) { | |
var A = a.toLowerCase(); | |
var B = b.toLowerCase(); | |
if (A < B) { | |
return -1; | |
} else if (A > B) { | |
return 1; | |
} else { | |
return 0; |
/* Have to set height explicity on ui-view | |
to prevent collapsing during animation*/ | |
[ui-view] { | |
padding-top: 55px; | |
height: 100%; | |
} | |
.ui-view-container { | |
position: relative; | |
} |