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
class Grid | |
constructor: (element, options) -> | |
@options = options || {} | |
@grid = ($ element) | |
@head = (@grid.find ".head") | |
@columns = (@head.find ".column") | |
@records = (@grid.find ".records") | |
@tables = (@grid.find ".table") | |
@resizing = false; |
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 | |
SCRIPT=$(readlink -f $0) | |
SCRIPTPATH=`dirname ${SCRIPT}` | |
export LD_LIBRARY_PATH="${SCRIPTPATH}" | |
export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6 | |
ulimit -s 3000 | |
/home/roy/PlexMediaServer/Plex\ Media\ Scanner --scan --refresh --section 1 | |
echo "Scan 1 Successful: $(date)" >> /home/roy/CronLightScan.log | |
/home/roy/PlexMediaServer/Plex\ Media\ Scanner --scan --refresh --section 2 | |
echo "Scan 2 Successful: $(date)" >> /home/roy/CronLightScan.log |
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
$ watchr .watchr | |
(in /Users/roy/Sites/keyword_extractor) | |
keyword_extractor | |
✔ test1 | |
stemmer | |
✔ Bad words get removed | |
✔ Diacritics get changed for their normal versions | |
✔ Non word characters should be removed |
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
(function(){ | |
var Carousel = { | |
initialize: function(element){ | |
if(!$(element)){ return; } | |
this.carousel = $(element); | |
this.picture_box = this.carousel.select(".pictures").first(); | |
this.links = this.carousel.select("a"); | |
this.arrow = this.carousel.select(".contents_container_arrow").first(); | |
this.timeout = 8; | |
this.current = 0; |
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 ProcessAsset | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
module InstanceMethods | |
def process | |
self.send("#{asset_name}_file_name") | |
end | |
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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Pimp</title> | |
<meta HTTP-EQUIV="REFRESH" content="0; url=http://pimp.maggie.test.royapps.nl"> | |
<!-- <meta HTTP-EQUIV="REFRESH" content="0; url=http://plugin.mspsite.com/action/showservice.jsp?homePath=http://www.mspportal.com/community&serviceid=grimradiolist&res=1280x720">--> | |
</head> | |
<body> |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Index</title> | |
<style type="text/css"> | |
style { | |
display: block; |
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 top_articles_for(widget_page_title, current_user) | |
article_relations = widget_page_widgets_for(widget_page_title, current_user).all.collect(&:widget).collect do |widget| | |
widget.top_articles | |
end | |
article_relations.inject {|sum, x| sum | x} | |
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
# rails3 + meta_where | |
name_relation = Article.where(:title >> "name") | |
name2_relation = Article.where(:title >> "name2") | |
# how to get an sql query like: "select * from articles where (title = 'name') or (title = 'name2') |
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
class Object | |
def tap(method =nil, *params, &block) | |
block.call(self) if block | |
self.send(method, *params) if method | |
self | |
end | |
end |