Skip to content

Instantly share code, notes, and snippets.

View chiraggude's full-sized avatar

Chirag Gude chiraggude

View GitHub Profile
@chiraggude
chiraggude / gist:3c3acf5977ce3c49e84a
Created July 20, 2014 16:25
Helper function to list Timezones
function getTimezones()
{
$zones_array1 = [];
$timestamp = time();
$timezones1 = timezone_identifiers_list();
foreach($timezones1 as $key => $zone)
{
date_default_timezone_set($zone);
$zones_array1[$zone] = 'UTC '. date('P', $timestamp) .' - '. $zone;
}
@chiraggude
chiraggude / rsyslog.conf
Created May 29, 2014 23:07
Rsyslog Conf (Server)
# rsyslog configuration file
# note that most of this config file uses old-style format,
# because it is well-known AND quite suitable for simple cases
# like we have with the default config. For more advanced
# things, RainerScript configuration is suggested.
# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
#### MODULES ####
@chiraggude
chiraggude / rsyslog.conf
Created May 29, 2014 22:59
Rsyslog.conf (Client)
# rsyslog configuration file
# note that most of this config file uses old-style format,
# because it is well-known AND quite suitable for simple cases
# like we have with the default config. For more advanced
# things, RainerScript configuration is suggested.
# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
#### MODULES ####
@chiraggude
chiraggude / nginx-logs.conf
Last active September 7, 2023 02:01
Rsyslog Client nginx conf
$ModLoad imfile
$InputFilePollInterval 10
$PrivDropToGroup adm
#NGINX access file:
# Path to the file which you want to monitor
$InputFileName /home/logs/nginx-access.log
@chiraggude
chiraggude / Math-Quiz
Created May 17, 2014 17:48
Math Quiz
View
@extends('layouts.master')
@section('content')
<h1>Quiz</h1>
<div class="col-md-6">
{{ Form::open(array('action'=> 'DevController@saveQuiz','class' => 'form-horizontal')) }}
@chiraggude
chiraggude / Install Ruby and RubyGems
Last active December 14, 2018 07:14
Install Ruby 2.1.1 and RubyGems 1.8.25 on CentOS 6.5
# Install Ruby
wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz
tar xvzf ruby-2.1.1.tar.gz
cd ruby-2.1.1
./configure --prefix=/usr
make
make install
# remove "ruby-2.1.1" folder in /root