This file contains hidden or 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
| gem install chef ruby-shadow --no-ri --no-rdoc |
This file contains hidden or 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
| android create avd -n my_avd -t 7 | |
| mksdcard -l e 512M mysdcard.img | |
| emulator -avd my_avd -sdcard mysdcard.img |
This file contains hidden or 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
| // parse nik | |
| Pattern p = Pattern.compile("([0-9]+)"); | |
| Matcher m = p.matcher(nik_); | |
| while (m.find()) { // Find each match in turn; String can't do this. | |
| nik += m.group(1) + ""; | |
| } | |
| // parse rt rw |
This file contains hidden or 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
| public String cleanupNonAlphanumeric(String s) { | |
| return s.replaceAll("[^A-Za-z0-9\\.\\s]", ""); | |
| } |
This file contains hidden or 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
| cd /opt/ | |
| mkdir /opt/redis | |
| wget http://redis.googlecode.com/files/redis-2.6.13.tar.gz | |
| tar -zxvf /opt/redis-2.6.13.tar.gz | |
| cd /opt/redis-2.6.13/ | |
| make | |
| cp /opt/redis-2.6.13/redis.conf /opt/redis/redis.conf.default | |
| cp /opt/redis-2.6.13/src/redis-benchmark /opt/redis/ | |
| cp /opt/redis-2.6.13/src/redis-cli /opt/redis/ |
This file contains hidden or 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
| daemonize yes | |
| pidfile /var/run/redis.pid | |
| logfile /var/log/redis.log | |
| port 6379 | |
| bind 127.0.0.1 | |
| timeout 300 | |
| loglevel notice |
This file contains hidden or 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
| cd /opt | |
| useradd -M -r --home-dir /opt/redis redis | |
| mv /opt/init-rpm.sh /etc/init.d/redis | |
| chmod +x /etc/rc.d/init.d/redis /etc/init.d/redis | |
| chown -R redis:redis /opt/redis | |
| touch /var/log/redis.log | |
| chown redis:redis /var/log/redis.log | |
| chkconfig --add redis | |
| chkconfig redis on |
This file contains hidden or 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
| #!/bin/sh | |
| # | |
| # script to start and stop redis as daemon | |
| # | |
| # chkconfig: - 85 15 | |
| # description: redis is a non-relational database storage system. | |
| # processname: redis | |
| # config: /opt/redis/redis.conf | |
| # binary: /opt/redis/redis-server |
This file contains hidden or 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
| <img class="thumbnail alignleft" src="http://images.thumbshots.com/image.aspx?cid=xxxxx&v=1&w=120&url=<?php print urlencode($v['url']) ?>" border="1" alt="<?php print $v['title'] ?>" /> |
This file contains hidden or 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
| <img src="http://images.thumbshots.com/image.aspx?cid=xxxxx&v=1&w=120&url=<?php print urlencode($v['url']) ?>" alt="<?php print $v['title'] ?>" style="border:1px solid #777;float:left;"> |