Skip to content

Instantly share code, notes, and snippets.

@rom3r4
rom3r4 / nginx.conf
Last active August 29, 2015 14:15 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@rom3r4
rom3r4 / nginx.conf
Last active August 29, 2015 14:13 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@rom3r4
rom3r4 / default.vcl
Last active August 29, 2015 14:08 — forked from reifman/default.vcl
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 60s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.max_connections = 800;
}
@rom3r4
rom3r4 / createuser.sql.md
Last active August 29, 2015 14:06
user commands, MySQL

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON . TO 'newuser'@'localhost';
FLUSH PRIVILEGES;

DROP USER ‘newuser’@‘localhost’;

SET PASSWORD FOR 'newuser'@'localhost' = PASSWORD('mypass');

GRANT [type of permission] ON [database name].[table name] TO ‘[username]’@'localhost’; REVOKE [type of permission] ON [database name].[table name] FROM ‘[username]’@‘localhost’;

@rom3r4
rom3r4 / page.css
Last active August 29, 2015 14:06
Carrot + Solr integration on ODS site.
/**
* ODS-Carrot, css override
* append this snippet on page.css (var/lib/tomcat7/webapps/carrot2/skins22/common/css)
*/
body#startup,
body#results {
background-image: none !important;
}
@rom3r4
rom3r4 / search-results--apachesolr-search.tpl.php
Last active August 29, 2015 14:06
Carrot + Solr integration on ODS site.
<?php
/**
* Modified File to contain ODS graphical Facet Interfaces
*
* @file
* Default theme implementation for displaying search results.
*
* This template collects each invocation of theme_search_result(). This and
* the child template are dependent to one another sharing the markup for
* definition lists.
@rom3r4
rom3r4 / template.php
Last active August 29, 2015 14:06
Carrot2 + Solr integration on ODS site.
/**
* Override or insert variables into the search template.
*
* @param $variables
* An array of variables to pass to the theme template.
*/
function ods_02_preprocess_search_results(&$variables) {
if (!empty($variables['module'])) {
@rom3r4
rom3r4 / solrconfig.xml
Created September 5, 2014 08:51
Integration of Tomcat7 + JDK7 + Solr4 + Carrot2 - .XML files.
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@rom3r4
rom3r4 / carrot2.documents.core.js
Last active August 29, 2015 14:06
Integration of Tomcat7 + JDK7 + Solr4 + Carrot2 - .XML files.
....
/**
* Initializes the core class handling functionality once the
* clusters finish loading.
*/
function loaded() {
preview();
clusters();
// Finished loading
@rom3r4
rom3r4 / tomcat-users.xml
Created September 5, 2014 05:05
Carrot2 Integration
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0