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
#!/bin/sh | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis/redis.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.pid |
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
############################## | |
############################## | |
robot_in_the_cloak: "Roboter im Regenmantel" | |
site_title: "#iOSonRailsConf 2013" | |
site_description: "Alushta Konferenz für Ruby on Rails und iOS-Entwickler aus aller Welt, die im Frühjahr 2013 stattfinden wird." | |
site_description_short: "Ruby on Rails und iOS-Entwickler Alushta Konferenz 2013." | |
site_keywords: "Ruby, Rails, ios, Entwickler, Konferenz, 2013, Web, Handy, iphone, ipad, ipod" |
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 wtruncate(text, length) | |
text = text.encode_utf8 | |
if text.length > length | |
sum = 0 | |
words_ret = [] | |
words = text.split(' ') | |
words.each do |word| | |
sum += word.length + 1 | |
break if sum > length | |
words_ret << word |