(and the oddities of number evaluation in JavaScript)
Type conversion, typecasting, and coercion are different ways of, implicitly or explicitly, changing an entity of one data type into another. [--wikipedia][wikipedia]
error_page 500 /500.html; | |
location /500.html{ | |
return 500 '{"error": {"status_code": 500,"status": "Internal Server Error"}}'; | |
} | |
error_page 502 /502.html; | |
location /502.html{ | |
return 502 '{"error": {"status_code": 502,"status": "Bad Gateway"}}'; | |
} |
#!/bin/bash | |
### USAGE | |
### | |
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
### | |
### CLI options Contributed by @janpieper | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
OBSOLETE PREFIXES | |
-xv-interpret-as // -xv- and -o- are old Opera prefixes for the Presto | |
-xv-phonemes // engine. Opera switched to the Blink engine with | |
-xv-voice-balance // version 15. The current version is 34. | |
-xv-voice-duration | |
-xv-voice-pitch | |
-xv-voice-pitch-range | |
-xv-voice-rate | |
-xv-voice-stress | |
-xv-voice-volume |
import urllib | |
import urllib2 | |
# Citadel Backconnect Server 1.3.5.1 Remote Code Execution vulnerability | |
# Work only on windows box | |
def request(url, params=None, method='GET'): | |
if method == 'POST': | |
urllib2.urlopen(url, urllib.urlencode(params)).read() | |
elif method == 'GET': |
import ssl | |
import sys | |
import optparse | |
import ConfigParser | |
import OpenSSL | |
def getCertificate(s): | |
cert_pem = ssl.get_server_certificate((s, 443)) | |
cert_der = ssl.PEM_cert_to_DER_cert(cert_pem) |
Based on documentation from ElasticSearch about snapshots
mkdir /srv/webplatform/elastic_backup
chown -R elasticsearch:elasticsearch /srv/webplatform/elastic_backup
@mixin flex($flex-type: flex) { | |
$flex-type: unquote($flex-type); | |
@include experimental-value(display, $flex-type, not -moz, -webkit, not -o, -ms, not -khtml, official); | |
} | |
@mixin align-items($alignment) { | |
$alignment: unquote($alignment); | |
@include experimental(align-items, $alignment, not -moz, -webkit, not -o, -ms, not -khtml, official); | |
} |
(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deploy
And Update the new password
##Setup your server (this would ideally be done with automated provisioning)
npm install -g forever
##Install flightplan
npm install -g flightplan
npm install flightplan --save-dev