Skip to content

Instantly share code, notes, and snippets.

@romedawg
romedawg / settings.py
Last active December 18, 2015 19:49 — forked from blackrobot/settings.py
"""
Here's my sample Django settings for a project I recently did. Visit http://damonjablons.wordpress.com to see the explanation.
"""
import os
import socket
# Set DEBUG = True if on the production server
if socket.gethostname() == 'your.domain.com':
DEBUG = False
@romedawg
romedawg / vim_centos.sh
Last active December 18, 2015 23:29 — forked from fundon/vim_centos.sh
#!/bin/bash
# on centos minimal
yum install gcc
yum install make
yum install ncurses-devel
yum install lua lua-devel
yum install ruby ruby-devel
yum install python python-devel
yum install perl perl-devel
@romedawg
romedawg / gist:52000854327464464fa1
Created December 4, 2014 00:45
logstash_config.conf
input {
file {
type => "nginx_access"
path => '/var/log/nginx/access.log'
}
file {
type => "nginx_errorr"
path => '/var/log/nginx/error.log'
}
}
@romedawg
romedawg / HomeController.java
Created December 1, 2015 14:38 — forked from elvan/HomeController.java
Spring MVC + Thymeleaf starter project
package org.example.blog.app.main;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
@RequestMapping("/")
public class HomeController {
@romedawg
romedawg / postgresql.conf
Last active January 4, 2016 18:56
default Postgresql 9.3 configuration file
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
# "#" anywhere on a line. The complete list of parameter names and allowed
#!/bin/sh
# Init script for kibana
# From Kibana package
### BEGIN INIT INFO
# Provides: kibana
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
@romedawg
romedawg / 1) Install
Created April 12, 2016 18:48 — forked from nghuuphuoc/1) Install
Install Redis on Centos 6
// --- Compiling ---
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install
// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
@romedawg
romedawg / redis-server-for-init.d-startup
Created April 22, 2016 23:35 — forked from lsbardel/redis-server-for-init.d-startup
Init.d Redis script for Ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
@romedawg
romedawg / ec2.py
Last active May 24, 2016 20:59
Boto3 Script
#!/usr/bin/env python
# Simple [boto3](https://github.com/boto/boto3) based EC2 manipulation tool
#
# To start an instance, create a yaml file with the following format:
#
# - subnet-azb:
# - type: t2.micro
# image: image-tagname
# name: myinstance
@romedawg
romedawg / install_ruby_1.9.3
Created August 17, 2016 00:05 — forked from slouma2000/install_ruby_1.9.3
Install Ruby 1.9.3 on CentOS, RedHat using RVM
Step 1: Upgrade Packages
# yum update
# yum groupinstall "Development Tools"
Step 2: Installing Recommended Packages
# yum install gcc-c++ patch readline readline-devel zlib zlib-devel
# yum install libyaml-devel libffi-devel openssl-devel make
# yum install bzip2 autoconf automake libtool bison iconv-devel
Step 3: Install RVM ( Ruby Version Manager )