Skip to content

Instantly share code, notes, and snippets.

View rbngzlv's full-sized avatar

Rubén González rbngzlv

  • Fanatik Coders
  • Barcelona
View GitHub Profile
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
server_name jira.example.com;
access_log off;
return 301 https://$server_name$request_uri;
}
# /etc/nginx/conf.d/jira.conf
server {
@rbngzlv
rbngzlv / 0_reuse_code.js
Created June 9, 2014 09:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

NOTE: You can check, if your config here:
http://www.sslshopper.com/ssl-checker.html

Decrypt the private key using the password you entered when you created your key:
openssl rsa -in ssl.key -out /etc/nginx/conf/ssl.key

Protect your key from prying eyes:
chmod 600 /etc/nginx/conf/ssl.key

@rbngzlv
rbngzlv / haproxy.conf
Last active August 29, 2015 14:06 — forked from janl/haproxy.conf
# HAProxy config for hoodie + ssl.
# Uses nginx for file serving on 127.0.0.1:5999
# This is optional, Hoodie can serve static files fine.
global
log 127.0.0.1 local0 debug
maxconn 4096
user haproxy
group haproxy
daemon
@rbngzlv
rbngzlv / de.yml
Last active August 29, 2015 14:09 — forked from smtm/de.yml
These are the code parts to grab related to this blog post.
Read more about it there
http://www.igumbi.com/en/blog/YAML-to-JSON-Rails-for-i18n-Language-Files
# The locale file structure de.yml
de:
obt:

NOTE: You can check, if your config here:
http://www.sslshopper.com/ssl-checker.html

Decrypt the private key using the password you entered when you created your key:
openssl rsa -in ssl.key -out /etc/nginx/conf/ssl.key

Protect your key from prying eyes:
chmod 600 /etc/nginx/conf/ssl.key

$campfire: image-url("campfire.png");
$campfire-2x: image-url("campfire@2x.png");
$star: image-url("star.png");
$tree: image-url("tree.png");
$campfire-logo: image-url("campsite.png");
$next-arrow: image-url("travel-camp-to-left.png");
$prev-arrow: image-url("travel-camp-to-right.png");
$ants-fruits-flowers-eggs: image-url("ants-fruits-flowers-eggs.png");
$boomerang: image-url("boomerang.png");
// color palette.
$white: #ffffff;
$grey: #ccc;
$greyblue: #5C6F7B;
$blackblue: #162934;
$lightblue: #29AAE2;
$darkblue: #006FAB;
$lightgreen: #B1BA1D;
$darkgreen: #8D8A00;
$brightred: #C4122F;
<?php
/**
* This code shows pagination for WooCommerce shortcodes when it's embeded on single pages.
* Include into functions.php.
*/
if ( ! is_admin() ) {
// ---------------------- FRONTPAGE -------------------
if ( defined('WC_VERSION') ) {
#!/bin/bash
# Install build dependencies
yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel
# Get GraphicsMagick source
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.9.tar.gz
tar zxvf GraphicsMagick-1.3.9.tar.gz
# Configure and compile