Skip to content

Instantly share code, notes, and snippets.

Chirag Gude chiraggude

Block or report user

Report or block chiraggude

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
@chiraggude
chiraggude / gist:3c3acf5977ce3c49e84a
Created Jul 20, 2014
Helper function to list Timezones
View gist:3c3acf5977ce3c49e84a
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
Rsyslog Conf (Server)
View rsyslog.conf
# 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
Rsyslog.conf (Client)
View rsyslog.conf
# 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 Dec 11, 2017
Rsyslog Client nginx conf
View nginx-logs.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
View 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 Dec 14, 2018
Install Ruby 2.1.1 and RubyGems 1.8.25 on CentOS 6.5
View Install Ruby and RubyGems
# 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
You can’t perform that action at this time.