Skip to content

Instantly share code, notes, and snippets.

julian romera julianromera

Block or report user

Report or block julianromera

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View theme.css
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,500,300);@-webkit-keyframes rotating{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes rotating{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}[src$='blue.png']{background-image:url(data:image/svg+xml;charset=UTF-8,%3Csvg%20height%3D%2218%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2218%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3Cpath%20fill%3D%22%23009688%22%20d%3D%22M12%202C6.48%202%202%206.48%202%2012s4.48%2010%2010%2010%2010-4.48%2010-10S17.52%202%2012%202zm-2%2015l-5-5%201.41-1.41L10%2014.17l7.59-7.59L19%208l-9%209z%22%2F%3E%3C%2Fsvg%3E)}[src$='red.png']{background-image:url(data:image/svg+xml;charset=UTF-8,%3Csvg%20height%3D%2218%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2218%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3Cpath%20fi
@julianromera
julianromera / install-comodo-ssl-cert-for-nginx.rst
Created Jul 2, 2016 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@julianromera
julianromera / gist:ba0c1001b696d5faaa5f1f1a29436ef3
Created Apr 14, 2016 — forked from guilherme/gist:9604324
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit.
View gist:ba0c1001b696d5faaa5f1f1a29436ef3
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console.log'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
View nginx_install.sh
#!/bin/bash
#
# Script to install/upgrade Nginx(Naxsi,PageSpeed,PCRE) from sources on CentOS 6
#
# Author: Duc Hieu - 12/2014.
# Base System: CentOS release 6.6 (Final)
# License: MIT
#
# Syntax: # sh nginx_install.sh
#
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
View 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;
}
@julianromera
julianromera / createuser.sql.md
Last active Aug 29, 2015
user commands, MySQL
View createuser.sql.md

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’;

@julianromera
julianromera / page.css
Last active Aug 29, 2015
Carrot + Solr integration on ODS site.
View page.css
/**
* 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;
}
You can’t perform that action at this time.