This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myssid=$(iwgetid -r) | |
if [[ $myssid == "NewsCred Inc" ]]; then | |
echo "In office" | |
/bin/bash -l -c '/home/jitu/Software/pycharm/bin/pycharm.sh' %f & | |
gnome-terminal --maximize --working-directory=/home/jitu/projects/marketingplatform | |
else | |
echo "Out of office" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div>A.K.M. Ashrafuzzaman</div> | |
<div>Lead Software Engineer</div> | |
<div><a href="http://www.newscred.com/" target="_blank">NewsCred</a></div> | |
<div><br></div> | |
<div>(M) 880-175-5592433</div> | |
<div><a href="https://twitter.com/ashrafuzzaman" target="_blank">Twitter</a> | <a | |
href="http://jitu-blog.blogspot.com/" target="_blank">Blog</a> | <a | |
href="https://www.facebook.com/ashrafuzzaman.jitu" target="_blank">Facebook</a></div> | |
<div><br></div> | |
<div><font color="#ff0000">Check out The <a href="http://newscred.com/theacademy" target="_blank">Academy</a>, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module WidgetHelper | |
def header(&block) | |
content_tag :div, class: 'header', &block | |
end | |
def widget(options={}, &block) | |
w = Widget.new(options, self) | |
widget_content = capture(w, &block) | |
content_tag :div, class: 'wrapper' do | |
widget_content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= header do %> | |
<h1>Rails widget</h1> | |
<% end %> | |
<%= widget do |w| %> | |
<%= w.title do %> | |
Title | |
<% end %> | |
<%= w.content do %> | |
Content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File: config/initializers/date.rb | |
# Parse date using Rails I18n or Ruby parse method if it failed. | |
# Reference https://gist.github.com/179712 | |
module DateTimeI18nParser | |
module ClassMethods | |
def _parse_with_i18n(str, format = :default) | |
format ||= :default | |
date = self._strptime(str, I18n.translate("#{self.name.downcase}.formats.#{format}")) || _parse_without_i18n(str) | |
date[:year] += increment_year(date[:year].to_i) if date[:year] |