Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
// WeatherKit REST API documentation lists `conditionCode` as a property returned for | |
// various DataSets and says it's an enumeration value | |
// (e.g. https://developer.apple.com/documentation/weatherkitrestapi/currentweather/currentweatherdata) | |
// but never says what the possible return values could be anywhere in the REST API docs | |
// | |
// The following was created from info in the Swift documentation: https://developer.apple.com/documentation/weatherkit/weathercondition | |
export interface ConditionCode { | |
code: string; | |
description: string; |
//actual function (must be a named function declaration for use w/ toString here) | |
function addOne(x){ return x+1 }; | |
//the actual worker code can be written as a string | |
//template literals make that convienient because they support multiline | |
//note that the addOne function above can be used in this worker code, since we'll be importing it | |
const workerScript = ` | |
self.addEventListener('message', function(e) { | |
var data = e.data; | |
console.log('worker recieved: ',data); |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
Ionic and ngCordova upload example |
javascript: (function() { | |
var root = $(document.getElementsByTagName('html')); | |
var watchers = []; | |
var attributes = []; | |
var attributes_with_values = []; | |
var elements = []; | |
var elements_per_attr = []; | |
var scopes = []; |
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,
//This is an example of how to scrape the web using PhantomJS and jQuery: | |
//source: http://snippets.aktagon.com/snippets/534-How-to-scrape-web-pages-with-PhantomJS-and-jQuery | |
//http://phantomjs.org/ | |
var page = new WebPage(), | |
url = 'http://localhost/a-search-form', | |
stepIndex = 0; | |
/** | |
* From PhantomJS documentation: |