Skip to content

Instantly share code, notes, and snippets.

View goldsky's full-sized avatar

rico goldsky

View GitHub Profile
@splittingred
splittingred / gist:4689218
Last active April 30, 2019 09:39
Example of modRest, a REST Client, in MODX 2.3.
$config = array(
'baseUrl' => rtrim('http://mywebsite.com/rest/api/','/'),
'format' => 'json', // json or xml, the format to request
'suppressSuffix' => false, // if false, will append .json or .xml to the URI requested
'username' => 'myuser', // if set, will use cURL auth to authenticate user
'password' => 'mypass',
'curlOptions' => array(
'timeout' => 30, // cURL timeout
'otherCurlOption' => 1,
@vumaasha
vumaasha / install_solr_in_jetty_9.sh
Created September 29, 2013 20:51
Installing solr on jetty 9. Downloads jetty and solr from the given urls and installs the sample core collection1 in solr in jetty 9. Also creates a use for jetty and installs jetty as a service. *Run the script as super user or using sudo in ubuntu.*
#!/bin/sh
# set the configuration variables below, before running the script
# get the solr nightly build download link from https://builds.apache.org/job/Solr-Artifacts-4.x/lastSuccessfulBuild/artifact/solr/package/
JETTY_URL="http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.0.5.v20130815.tar.gz&r=1"
JETTY_HOME="/opt/jetty"
JAVA='/usr/local/jdk1.7.0_09/bin/java'
JETTY_PORT=8085
JETTY_HOST=127.0.0.1
@plentz
plentz / nginx.conf
Last active March 20, 2024 18:49
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048