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
<?php | |
/** | |
* Check to see if the visitor is coming from the mobile site link | |
* | |
*/ | |
$token = isset($_GET['token']) ? $_GET['token'] : null; | |
/** | |
* If they are coming from the mobile site, set a cookie that expires in 1 hour |
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
namespace :load do | |
ZIP_CODE_DATA_URL = 'http://www.census.gov/tiger/tms/gazetteer/zips.txt' | |
# Swiped from ActiveRecord migrations.rb | |
def announce(message) | |
length = [0, 75 - message.length].max | |
puts "== %s %s" % [message, "=" * length] | |
end |
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
When starting a project that includes refinerycms-blog: | |
$ rake refinery:override view=refinery/pages/* | |
$ rake refinery:override view=layouts/* | |
$ rake refinery:override view=refinery/blog/shared/* | |
$ rake refinery:override view=refinery/blog/posts/* | |
$ rake refinery:override view=refinery/* | |
$ rake refinery:override controller=refinery/blog/* | |
$ rake refinery:override controller=refinery/* |
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
./configure --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --with-gs-font-dir=$FONTS |
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
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
mkdir ~/tmp && cd ~/tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz | |
tar -xvzf ruby-1.9.3-p286.tar.gz | |
cd ruby-1.9.3-p286/ | |
./configure --prefix=/usr/local | |
make | |
make install |
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
Nginx is now installed in /opt/nginx, but there are no "init" scripts to control this process. Issue the following sequence of commands to download a script, move it to the proper directory, set the proper permissions and set system startup links: | |
cd /opt | |
wget -O init-deb.sh http://library.linode.com/assets/602-init-deb.sh | |
mv /opt/init-deb.sh /etc/init.d/nginx | |
chmod +x /etc/init.d/nginx | |
/usr/sbin/update-rc.d -f nginx defaults | |
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
<!-- ################## TEXTAREA FIELD ################## --> | |
<form action=""> | |
<textarea name="test" id="test" cols="17" rows="5"></textarea> | |
</form> | |
<!-- ################ END TEXTAREA FIELD ################ --> | |
<!-- ################## ECHOING THE VALUE IN THE CALENDAR ################## --> | |
<?php echo nl2br($value); ?> | |
<!-- ################ END ECHOING THE VALUE IN THE CALENDAR ################ --> |
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 id="zdpop" class="zpopup"> | |
<img title="Edit" id="content_81850_editbutton" onclick="changediv(this,1,1);" | |
src="icons/edit_handle.jpg" style="cursor: pointer;"> <a class="delete" title="Delete" | |
onclick="ArticleSerialDel(this,'frontpage',19203,2504,1,81850,'frontpagelist_81850');" | |
href="javascript:void(0);"> <img src="icons/delete_handle.jpg"> | |
</a> <img class="handle" src="icons/move_handle.jpg" | |
style="cursor: pointer;"> | |
</div> |
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
.bigcalday { | |
height: 84px; | |
width: 84px; | |
background: #fcfaec; | |
font-size: 12pt; | |
overflow: hidden; | |
cursor: pointer; | |
} | |
.bigcalday:hover, .halfbigcalday:hover, .calcurrent { | |
background: #9DC9E0; |
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
def us_states | |
[ | |
['AL', 'AL'], | |
['AK', 'AK'], | |
['AZ', 'AZ'], | |
['AR', 'AR'], | |
['CA', 'CA'], | |
['CO', 'CO'], | |
['CT', 'CT'], | |
['DE', 'DE'], |
OlderNewer