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
<style type="text/css"> | |
.top { | |
margin-top: 10px; | |
} | |
.heading { | |
font-weight: bold; | |
font-size: 22px; | |
text-align: left; | |
color: #1788DC; |
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
<script src="js/jquery-1.4.min.js" type="text/javascript"></script> | |
<script src="js/cufon-yui.js" type="text/javascript"></script> | |
<script src="js/fonts/vanilla.cufonfonts.js" type="text/javascript"></script> | |
<script> | |
$(document).ready(function() { | |
Cufon.replace($(".heading")); | |
}); | |
</script> |
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
<html> | |
<head> | |
<link href="css/screen.css" rel="stylesheet" type="text/css"/> | |
<link href="css/ie.css" rel="stylesheet" type="text/css"/> | |
<link href="css/print.css" rel="stylesheet" type="text/css"/> | |
<style type="text/css"> | |
.top { | |
margin-top: 10px; | |
} |
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
wkhtmltopdf sample-brochure.html sample-brochure.pdf |
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
<html> | |
<head> | |
<link href="css/screen.css" rel="stylesheet" type="text/css"/> | |
<link href="css/ie.css" rel="stylesheet" type="text/css"/> | |
<link href="css/print.css" rel="stylesheet" type="text/css"/> | |
<style type="text/css"> | |
.top { | |
margin-top: 10px; | |
} |
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
apt-get install dictd | |
apt-get install dict-gcide | |
apt-get install dict-moby-thesaurus | |
"Application -> Office -> Dictionary -> Edit –> Preference -> Add" | |
Description : <<Your description>> | |
Transport : Dictionary Server | |
Hostname : 127.0.0.1 | |
Port : 2628 |
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
logger = Logger.new(File.join( Rails.root, "log", "my_#{ Rails.env}.log"), 'daily') | |
logger.level = Logger::INFO | |
logger.formatter = proc do |severity, datetime, progname, msg| | |
"#{datetime.strftime("%B %d %H:%M:%S")} #{Socket.gethostname}, [#{$$}]:, #{severity} MY_WEBAPP, #{msg}\n" | |
end | |
tag_log = ActiveSupport::TaggedLogging.new(logger) | |
config.logger = tag_log | |
# above code will produce log in format as shown below, |
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
####### Machine A ########### | |
# create package index file | |
cd /var/cache/apt/archives/ | |
dpkg-scanpackages . /dev/null | gzip -c -9 > Packages.gz | |
# start mongoose (code.google.com/p/mongoose) / any webserver with document root as "/var/cache/apt/archives/" | |
mongoose -r /var/cache/apt/archives/ | |
####### Machine B ########### | |
# edit " /etc/apt/sources.list" |
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
How to configure timezone in Rails | |
==================================== | |
Database table didn't care about timezone's. It just preserves datetime data. | |
Hence it is up to (Rails) applications to manage timezone's. | |
Rails application needs to manage timezone in two ways via configuration - config/application.rb | |
(See http://guides.rubyonrails.org/configuring.html for more details), | |
1. While storing data in DB, which TZ to use | |
> Allows us to use only :local or :utc TZ's |
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
# change shell to bash | |
export SHELL=/bin/bash | |
# install mysql lib | |
sudo apt-get install libmysqlclient-dev | |
# install openssl & dev files | |
sudo apt-get install libssl-dev openssl | |
# install smb client libs |
OlderNewer